trie: fix the bug checking empty trie

This commit is contained in:
Qian Bin 2019-11-28 18:59:12 +08:00 committed by GitHub
parent 08611cfd75
commit 247298c7a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,7 +135,7 @@ func (e seekError) Error() string {
} }
func newNodeIterator(trie *Trie, start []byte) NodeIterator { func newNodeIterator(trie *Trie, start []byte) NodeIterator {
if trie.Hash() == emptyState { if trie.Hash() == emptyRoot {
return new(nodeIterator) return new(nodeIterator)
} }
it := &nodeIterator{trie: trie} it := &nodeIterator{trie: trie}