@@ -128,7 +128,7 @@ func VerifyProof(rootHash common.Hash, key []byte, proofDb ethdb.KeyValueReader)
128128 case hashNode :
129129 key = keyrest
130130 copy (wantHash [:], cld )
131- case valueNode :
131+ case * valueNode :
132132 return cld .resolve (), nil
133133 }
134134 }
@@ -191,7 +191,7 @@ func proofToPath(rootHash common.Hash, root node, key []byte, proofDb ethdb.KeyV
191191 if err != nil {
192192 return nil , nil , err
193193 }
194- case valueNode :
194+ case * valueNode :
195195 valnode = cld .resolve ()
196196 }
197197 // Link the parent and child.
@@ -298,7 +298,7 @@ findFork:
298298 }
299299 // Only one proof points to non-existent key.
300300 if shortForkRight != 0 {
301- if _ , ok := rn .Val .(valueNode ); ok {
301+ if _ , ok := rn .Val .(* valueNode ); ok {
302302 // The fork point is root node, unset the entire trie
303303 if parent == nil {
304304 return true , nil
@@ -309,7 +309,7 @@ findFork:
309309 return false , unset (rn , rn .Val , left [pos :], len (rn .Key ), false )
310310 }
311311 if shortForkLeft != 0 {
312- if _ , ok := rn .Val .(valueNode ); ok {
312+ if _ , ok := rn .Val .(* valueNode ); ok {
313313 // The fork point is root node, unset the entire trie
314314 if parent == nil {
315315 return true , nil
@@ -396,7 +396,7 @@ func unset(parent node, child node, key []byte, pos int, removeLeft bool) error
396396 }
397397 return nil
398398 }
399- if _ , ok := cld .Val .(valueNode ); ok {
399+ if _ , ok := cld .Val .(* valueNode ); ok {
400400 fn := parent .(* fullNode )
401401 fn .Children [key [pos - 1 ]] = nil
402402 return nil
@@ -432,7 +432,7 @@ func hasRightElement(node node, key []byte) bool {
432432 return bytes .Compare (rn .Key , key [pos :]) > 0
433433 }
434434 node , pos = rn .Val , pos + len (rn .Key )
435- case valueNode :
435+ case * valueNode :
436436 return false // We have resolved the whole path
437437 default :
438438 panic (fmt .Sprintf ("%T: invalid node: %v" , node , node )) // hashnode
@@ -612,7 +612,7 @@ func get(tn node, key []byte, skipResolved bool) ([]byte, node) {
612612 return key , n
613613 case nil :
614614 return key , nil
615- case valueNode :
615+ case * valueNode :
616616 return nil , n
617617 default :
618618 panic (fmt .Sprintf ("%T: invalid node: %v" , tn , tn ))
0 commit comments