good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
da5de012
Commit
da5de012
authored
Mar 12, 2019
by
Sheldon
Committed by
Péter Szilágyi
Mar 12, 2019
Browse files
Options
Downloads
Patches
Plain Diff
state: fix emptyStatet to emptyRoot (#19254)
parent
04a4a23c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/state/statedb.go
+3
-3
3 additions, 3 deletions
core/state/statedb.go
with
3 additions
and
3 deletions
core/state/statedb.go
+
3
−
3
View file @
da5de012
...
...
@@ -37,8 +37,8 @@ type revision struct {
}
var
(
// empty
State
is the known hash of an empty
state trie entry
.
empty
State
=
crypto
.
Keccak256Hash
(
nil
)
// empty
Root
is the known
root
hash of an empty
trie
.
empty
Root
=
common
.
HexToHash
(
"56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
)
// emptyCode is the known hash of the empty EVM bytecode.
emptyCode
=
crypto
.
Keccak256Hash
(
nil
)
...
...
@@ -653,7 +653,7 @@ func (s *StateDB) Commit(deleteEmptyObjects bool) (root common.Hash, err error)
if
err
:=
rlp
.
DecodeBytes
(
leaf
,
&
account
);
err
!=
nil
{
return
nil
}
if
account
.
Root
!=
empty
State
{
if
account
.
Root
!=
empty
Root
{
s
.
db
.
TrieDB
()
.
Reference
(
account
.
Root
,
parent
)
}
code
:=
common
.
BytesToHash
(
account
.
CodeHash
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment