Skip to content

Commit

Permalink
chore: revert lint fix RVV-B0001
Browse files Browse the repository at this point in the history
  • Loading branch information
notbdu committed Mar 22, 2022
1 parent 141d862 commit b315b64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/trie/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,14 @@ func (t *Trie) writeDirty(db chaindb.Batch, n Node) error {
// We need to compute the hash values of each newly inserted node.
func (t *Trie) GetInsertedNodeHashes() (hashesSet map[common.Hash]struct{}, err error) {
hashesSet = make(map[common.Hash]struct{})
err = t._getInsertedNodeHashes(t.root, hashesSet)
err = t.getInsertedNodeHashes(t.root, hashesSet)
if err != nil {
return nil, err
}
return hashesSet, nil
}

func (t *Trie) _getInsertedNodeHashes(n Node, hashes map[common.Hash]struct{}) (err error) {
func (t *Trie) getInsertedNodeHashes(n Node, hashes map[common.Hash]struct{}) (err error) {
// TODO pass map of hashes or slice as argument to avoid copying
// and using more memory.
if n == nil || !n.IsDirty() {
Expand Down Expand Up @@ -472,7 +472,7 @@ func (t *Trie) _getInsertedNodeHashes(n Node, hashes map[common.Hash]struct{}) (
continue
}

err := t._getInsertedNodeHashes(child, hashes)
err := t.getInsertedNodeHashes(child, hashes)
if err != nil {
// Note: do not wrap error since this is called recursively.
return err
Expand Down

0 comments on commit b315b64

Please sign in to comment.