@@ -26,7 +26,6 @@ import (
2626
2727 "github.com/ethereum/go-ethereum/common"
2828 "github.com/ethereum/go-ethereum/core/types"
29- "github.com/ethereum/go-ethereum/core/vm"
3029 "github.com/ethereum/go-ethereum/crypto"
3130 "github.com/ethereum/go-ethereum/log"
3231 "github.com/ethereum/go-ethereum/rlp"
4645 emptyCode = crypto .Keccak256Hash (nil )
4746)
4847
48+ type proofList [][]byte
49+
50+ func (n * proofList ) Put (key []byte , value []byte ) error {
51+ * n = append (* n , value )
52+ return nil
53+ }
54+
4955// StateDBs within the ethereum protocol are used to store anything
5056// within the merkle trie. StateDBs take care of caching and storing
5157// nested states. It's the general query interface to retrieve:
@@ -259,21 +265,21 @@ func (self *StateDB) GetState(addr common.Address, hash common.Hash) common.Hash
259265}
260266
261267// GetProof returns the MerkleProof for a given Account
262- func (self * StateDB ) GetProof (a common.Address ) (vm. ProofList , error ) {
263- var proof vm. ProofList
268+ func (self * StateDB ) GetProof (a common.Address ) ([][] byte , error ) {
269+ var proof proofList
264270 err := self .trie .Prove (crypto .Keccak256 (a .Bytes ()), 0 , & proof )
265- return proof , err
271+ return [][] byte ( proof ) , err
266272}
267273
268274// GetProof returns the StorageProof for given key
269- func (self * StateDB ) GetStorageProof (a common.Address , key common.Hash ) (vm. ProofList , error ) {
270- var proof vm. ProofList
275+ func (self * StateDB ) GetStorageProof (a common.Address , key common.Hash ) ([][] byte , error ) {
276+ var proof proofList
271277 trie := self .StorageTrie (a )
272278 if trie == nil {
273279 return proof , errors .New ("storage trie for requested address does not exist" )
274280 }
275281 err := trie .Prove (crypto .Keccak256 (key .Bytes ()), 0 , & proof )
276- return proof , err
282+ return [][] byte ( proof ) , err
277283}
278284
279285// GetCommittedState retrieves a value from the given account's committed storage trie.
0 commit comments