|
|
|
@ -333,17 +333,6 @@ func (s *StateDB) GetStorageProof(a common.Address, key common.Hash) ([][]byte, |
|
|
|
|
return proof, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// GetStorageProofByHash returns the Merkle proof for given storage slot.
|
|
|
|
|
func (s *StateDB) GetStorageProofByHash(a common.Address, key common.Hash) ([][]byte, error) { |
|
|
|
|
var proof proofList |
|
|
|
|
trie := s.StorageTrie(a) |
|
|
|
|
if trie == nil { |
|
|
|
|
return proof, errors.New("storage trie for requested address does not exist") |
|
|
|
|
} |
|
|
|
|
err := trie.Prove(crypto.Keccak256(key.Bytes()), 0, &proof) |
|
|
|
|
return proof, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// GetCommittedState retrieves a value from the given account's committed storage trie.
|
|
|
|
|
func (s *StateDB) GetCommittedState(addr common.Address, hash common.Hash) common.Hash { |
|
|
|
|
stateObject := s.getStateObject(addr) |
|
|
|
@ -597,7 +586,6 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
newobj = newObject(s, addr, Account{}) |
|
|
|
|
newobj.setNonce(0) // sets the object to dirty
|
|
|
|
|
if prev == nil { |
|
|
|
|
s.journal.append(createObjectChange{account: &addr}) |
|
|
|
|
} else { |
|
|
|
|