Skip to content

Commit

Permalink
trie: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 committed Sep 23, 2022
1 parent a91e35c commit 90a63c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion trie/committer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion trie/trie_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 90a63c5

Please sign in to comment.