@@ -298,8 +298,8 @@ func (s *StateDB) GetState(addr common.Address, hash common.Hash) common.Hash {
298
298
299
299
// GetProof returns the Merkle proof for a given account.
300
300
func (s * StateDB ) GetProof (addr common.Address ) ([][]byte , []byte , [][]byte , bool , bool , error ) {
301
- var newAddr common. Hash
302
- if oracle .PreventHashingInSecureTrie {
301
+ newAddr := crypto . Keccak256Hash ( addr . Bytes ())
302
+ if oracle .AccountPreventHashingInSecureTrie {
303
303
bytes := append (addr .Bytes (), []byte {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }... )
304
304
newAddr = common .BytesToHash (bytes )
305
305
}
@@ -317,7 +317,7 @@ func (s *StateDB) GetProofByHash(addrHash common.Hash) ([][]byte, []byte, [][]by
317
317
func (s * StateDB ) GetStorageProof (a common.Address , key common.Hash ) ([][]byte , []byte , [][]byte , bool , bool , error ) {
318
318
var proof proofList
319
319
newAddr := a
320
- if oracle .PreventHashingInSecureTrie {
320
+ if oracle .AccountPreventHashingInSecureTrie {
321
321
bytes := append (a .Bytes (), []byte {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }... )
322
322
newAddr = common .BytesToAddress (bytes )
323
323
}
@@ -545,7 +545,7 @@ func (s *StateDB) updateStateObject(obj *stateObject) {
545
545
panic (fmt .Errorf ("can't encode object at %x: %v" , addr [:], err ))
546
546
}
547
547
548
- if ! oracle .PreventHashingInSecureTrie {
548
+ if ! oracle .AccountPreventHashingInSecureTrie {
549
549
if err = s .trie .TryUpdateAlwaysHash (addr [:], data ); err != nil {
550
550
s .setError (fmt .Errorf ("updateStateObject (%x) error: %v" , addr [:], err ))
551
551
}
0 commit comments