code: func VerifyProof(rootHash common.Hash, key []byte, proofDb ethdb.Reader) (value []byte, nodes int, err error) {
  	key = keybytesToHex(key)
  	wantHash := rootHash
  	for i := 0; ; i++ {
  		buf, _ := proofDb.Get(wantHash[:])
  		if buf == nil {
  			return nil, i, fmt.Errorf("proof node %d (hash %064x) missing", i, wantHash)
  		}
  		n, err := decodeNode(wantHash[:], buf)
  		if err != nil {
  			return nil, i, fmt.Errorf("bad proof node %d: %v", i, err)
  		}
  		keyrest, cld := get(n, key)
  		switch cld := cld.(type) {
  		case nil:
  			// The trie doesn't contain the key.
  			return nil, i, nil
  		case hashNode:
  			key = keyrest
  			copy(wantHash[:], cld)
  		case valueNode:
  			return cld, i + 1, nil
  		}
  	}
  }
docs: // VerifyProof checks merkle proofs. The given proof must contain the value for
  // key in a trie with the given root hash. VerifyProof returns an error if the
  // proof contains invalid trie nodes or the wrong value.