Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
bca8c03e
Unverified
Commit
bca8c03e
authored
Jun 25, 2021
by
Li Dongwei
Committed by
GitHub
Jun 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/state: remove unused methods ReturnGas, GetStorageProofByHash (#23092)
Co-authored-by:
lidongwei
<
lidongwei@huobi.com
>
parent
c07918e7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
17 deletions
+0
-17
state_object.go
core/state/state_object.go
+0
-3
statedb.go
core/state/statedb.go
+0
-12
logger_test.go
core/vm/logger_test.go
+0
-1
tracer_test.go
eth/tracers/tracer_test.go
+0
-1
No files found.
core/state/state_object.go
View file @
bca8c03e
...
...
@@ -450,9 +450,6 @@ func (s *stateObject) setBalance(amount *big.Int) {
s
.
data
.
Balance
=
amount
}
// Return the gas back to the origin. Used by the Virtual machine or Closures
func
(
s
*
stateObject
)
ReturnGas
(
gas
*
big
.
Int
)
{}
func
(
s
*
stateObject
)
deepCopy
(
db
*
StateDB
)
*
stateObject
{
stateObject
:=
newObject
(
db
,
s
.
address
,
s
.
data
)
if
s
.
trie
!=
nil
{
...
...
core/state/statedb.go
View file @
bca8c03e
...
...
@@ -333,17 +333,6 @@ func (s *StateDB) GetStorageProof(a common.Address, key common.Hash) ([][]byte,
return
proof
,
err
}
// GetStorageProofByHash returns the Merkle proof for given storage slot.
func
(
s
*
StateDB
)
GetStorageProofByHash
(
a
common
.
Address
,
key
common
.
Hash
)
([][]
byte
,
error
)
{
var
proof
proofList
trie
:=
s
.
StorageTrie
(
a
)
if
trie
==
nil
{
return
proof
,
errors
.
New
(
"storage trie for requested address does not exist"
)
}
err
:=
trie
.
Prove
(
crypto
.
Keccak256
(
key
.
Bytes
()),
0
,
&
proof
)
return
proof
,
err
}
// GetCommittedState retrieves a value from the given account's committed storage trie.
func
(
s
*
StateDB
)
GetCommittedState
(
addr
common
.
Address
,
hash
common
.
Hash
)
common
.
Hash
{
stateObject
:=
s
.
getStateObject
(
addr
)
...
...
@@ -597,7 +586,6 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject)
}
}
newobj
=
newObject
(
s
,
addr
,
Account
{})
newobj
.
setNonce
(
0
)
// sets the object to dirty
if
prev
==
nil
{
s
.
journal
.
append
(
createObjectChange
{
account
:
&
addr
})
}
else
{
...
...
core/vm/logger_test.go
View file @
bca8c03e
...
...
@@ -30,7 +30,6 @@ type dummyContractRef struct {
calledForEach
bool
}
func
(
dummyContractRef
)
ReturnGas
(
*
big
.
Int
)
{}
func
(
dummyContractRef
)
Address
()
common
.
Address
{
return
common
.
Address
{}
}
func
(
dummyContractRef
)
Value
()
*
big
.
Int
{
return
new
(
big
.
Int
)
}
func
(
dummyContractRef
)
SetCode
(
common
.
Hash
,
[]
byte
)
{}
...
...
eth/tracers/tracer_test.go
View file @
bca8c03e
...
...
@@ -39,7 +39,6 @@ func (account) SetBalance(*big.Int) {}
func
(
account
)
SetNonce
(
uint64
)
{}
func
(
account
)
Balance
()
*
big
.
Int
{
return
nil
}
func
(
account
)
Address
()
common
.
Address
{
return
common
.
Address
{}
}
func
(
account
)
ReturnGas
(
*
big
.
Int
)
{}
func
(
account
)
SetCode
(
common
.
Hash
,
[]
byte
)
{}
func
(
account
)
ForEachStorage
(
cb
func
(
key
,
value
common
.
Hash
)
bool
)
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment