mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
triedb: opt storageKey
This commit is contained in:
parent
7d8ccddaac
commit
b0c2755ce3
1 changed files with 2 additions and 2 deletions
|
|
@ -28,8 +28,8 @@ import (
|
||||||
// storageKey returns a key for uniquely identifying the storage slot.
|
// storageKey returns a key for uniquely identifying the storage slot.
|
||||||
func storageKey(accountHash common.Hash, slotHash common.Hash) [64]byte {
|
func storageKey(accountHash common.Hash, slotHash common.Hash) [64]byte {
|
||||||
var key [64]byte
|
var key [64]byte
|
||||||
copy(key[:32], accountHash[:])
|
*(*[32]byte)(key[32:]) = slotHash
|
||||||
copy(key[32:], slotHash[:])
|
*(*[32]byte)(key[:32]) = accountHash
|
||||||
return key
|
return key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue