Skip to content

Commit 3fe484c

Browse files
committed
core/state/snapshot: rebase
1 parent c1caa9a commit 3fe484c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/state/snapshot/conversion.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,16 +475,15 @@ func stdGenerate(db ethdb.Database, in chan trieKV, out chan common.Hash) {
475475
}
476476

477477
func stackTrieGenerate(db ethdb.Database, in chan trieKV, out chan common.Hash) {
478-
commit := db != nil
479478
t := trie.NewStackTrie(db)
480479
for leaf := range in {
481480
t.TryUpdate(leaf.key[:], leaf.value)
482481
}
483482
var root common.Hash
484-
if !commit {
483+
if db == nil {
485484
root = t.Hash()
486485
} else {
487-
root = t.Commit(db)
486+
root, _ = t.Commit()
488487
}
489488
out <- root
490489
}

0 commit comments

Comments
 (0)