trie: polish commit function (#21692)

* trie: polish commit function

* trie: fix typo
This commit is contained in:
gary rong
2020-10-12 18:08:04 +08:00
committed by GitHub
parent 706f5e3b98
commit 86dd005544
2 changed files with 19 additions and 9 deletions

View File

@ -831,7 +831,10 @@ func TestCommitSequenceStackTrie(t *testing.T) {
// Flush memdb -> disk (sponge)
db.Commit(root, false, nil)
// And flush stacktrie -> disk
stRoot := stTrie.Commit(stTrie.db)
stRoot, err := stTrie.Commit()
if err != nil {
t.Fatalf("Failed to commit stack trie %v", err)
}
if stRoot != root {
t.Fatalf("root wrong, got %x exp %x", stRoot, root)
}