From f63c68c245d7276c82ba7d9b3ce315287f94fed1 Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Wed, 22 Apr 2020 19:10:54 +0800 Subject: [PATCH] trie: fix minor issue --- trie/proof.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trie/proof.go b/trie/proof.go index 0bf841d16e..7ce76f8c89 100644 --- a/trie/proof.go +++ b/trie/proof.go @@ -166,7 +166,7 @@ func proofToPath(rootHash common.Hash, root node, key []byte, proofDb ethdb.KeyV switch cld := child.(type) { case nil: // The trie doesn't contain the key. - return nil, fmt.Errorf("the node is not contained in trie") + return nil, errors.New("the node is not contained in trie") case *shortNode: key, parent = keyrest, child // Already resolved continue @@ -198,7 +198,8 @@ func proofToPath(rootHash common.Hash, root node, key []byte, proofDb ethdb.KeyV } // unsetInternal removes all internal node references(hashnode, embedded node). -// It should be called after a trie is constructed with two edge proofs. +// It should be called after a trie is constructed with two edge proofs. Also +// the given boundary keys must be the one used to construct the edge proofs. // // It's the key step for range proof. All visited nodes should be marked dirty // since the node content might be modified. Besides it can happen that some