mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
check preimages first
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
1ebe82d779
commit
b6763c9864
1 changed files with 3 additions and 3 deletions
|
|
@ -240,12 +240,12 @@ func (t *StateTrie) DeleteAccount(address common.Address) error {
|
|||
// GetKey returns the sha3 preimage of a hashed key that was
|
||||
// previously used to store a value.
|
||||
func (t *StateTrie) GetKey(shaKey []byte) []byte {
|
||||
if key, ok := t.getSecKeyCache()[common.BytesToHash(shaKey)]; ok {
|
||||
return key
|
||||
}
|
||||
if t.preimages == nil {
|
||||
return nil
|
||||
}
|
||||
if key, ok := t.getSecKeyCache()[common.BytesToHash(shaKey)]; ok {
|
||||
return key
|
||||
}
|
||||
return t.preimages.Preimage(common.BytesToHash(shaKey))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue