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
da5de012
Commit
da5de012
authored
Mar 12, 2019
by
Sheldon
Committed by
Péter Szilágyi
Mar 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
state: fix emptyStatet to emptyRoot (#19254)
parent
04a4a23c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
statedb.go
core/state/statedb.go
+3
-3
No files found.
core/state/statedb.go
View file @
da5de012
...
@@ -37,8 +37,8 @@ type revision struct {
...
@@ -37,8 +37,8 @@ type revision struct {
}
}
var
(
var
(
// empty
State is the known hash of an empty state trie entry
.
// empty
Root is the known root hash of an empty trie
.
empty
State
=
crypto
.
Keccak256Hash
(
nil
)
empty
Root
=
common
.
HexToHash
(
"56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
)
// emptyCode is the known hash of the empty EVM bytecode.
// emptyCode is the known hash of the empty EVM bytecode.
emptyCode
=
crypto
.
Keccak256Hash
(
nil
)
emptyCode
=
crypto
.
Keccak256Hash
(
nil
)
...
@@ -653,7 +653,7 @@ func (s *StateDB) Commit(deleteEmptyObjects bool) (root common.Hash, err error)
...
@@ -653,7 +653,7 @@ func (s *StateDB) Commit(deleteEmptyObjects bool) (root common.Hash, err error)
if
err
:=
rlp
.
DecodeBytes
(
leaf
,
&
account
);
err
!=
nil
{
if
err
:=
rlp
.
DecodeBytes
(
leaf
,
&
account
);
err
!=
nil
{
return
nil
return
nil
}
}
if
account
.
Root
!=
empty
State
{
if
account
.
Root
!=
empty
Root
{
s
.
db
.
TrieDB
()
.
Reference
(
account
.
Root
,
parent
)
s
.
db
.
TrieDB
()
.
Reference
(
account
.
Root
,
parent
)
}
}
code
:=
common
.
BytesToHash
(
account
.
CodeHash
)
code
:=
common
.
BytesToHash
(
account
.
CodeHash
)
...
...
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