diff --git a/trie/committer.go b/trie/committer.go index b241b34eecfa..90191cf9b1dd 100644 --- a/trie/committer.go +++ b/trie/committer.go @@ -62,7 +62,7 @@ func (c *committer) Commit(n node) (hashNode, *NodeSet, error) { // embedded in the parent and now deleted from the trie. In this case // it's noop from database's perspective. val := c.tracer.getPrev(path) - if val == nil { + if len(val) == 0 { continue } c.nodes.markDeleted(path, val) diff --git a/trie/trie_reader.go b/trie/trie_reader.go index 0f883270bb56..c235da2ea9fd 100644 --- a/trie/trie_reader.go +++ b/trie/trie_reader.go @@ -35,7 +35,7 @@ type Reader interface { NodeBlob(owner common.Hash, path []byte, hash common.Hash) ([]byte, error) } -// NodeReader warps all the necessary functions for accessing trie node. +// NodeReader wraps all the necessary functions for accessing trie node. type NodeReader interface { // GetReader returns a reader for accessing all trie nodes with provided // state root. Nil is returned in case the state is not available.