mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
Update schema.go
This commit is contained in:
parent
08ee6b45e0
commit
2b098e1a1a
1 changed files with 3 additions and 3 deletions
|
|
@ -384,7 +384,7 @@ func accountHistoryIndexKey(addressHash common.Hash) []byte {
|
||||||
|
|
||||||
// storageHistoryIndexKey = StateHistoryStorageMetadataPrefix + addressHash + storageHash
|
// storageHistoryIndexKey = StateHistoryStorageMetadataPrefix + addressHash + storageHash
|
||||||
func storageHistoryIndexKey(addressHash common.Hash, storageHash common.Hash) []byte {
|
func storageHistoryIndexKey(addressHash common.Hash, storageHash common.Hash) []byte {
|
||||||
totalLen := len(StateHistoryStorageMetadataPrefix) + len(addressHash) + len(storageHash)
|
totalLen := len(StateHistoryStorageMetadataPrefix) + 2*common.HashLength
|
||||||
out := make([]byte, totalLen)
|
out := make([]byte, totalLen)
|
||||||
|
|
||||||
off := 0
|
off := 0
|
||||||
|
|
@ -400,7 +400,7 @@ func accountHistoryIndexBlockKey(addressHash common.Hash, blockID uint32) []byte
|
||||||
var buf4 [4]byte
|
var buf4 [4]byte
|
||||||
binary.BigEndian.PutUint32(buf4[:], blockID)
|
binary.BigEndian.PutUint32(buf4[:], blockID)
|
||||||
|
|
||||||
totalLen := len(StateHistoryAccountBlockPrefix) + len(addressHash) + 4
|
totalLen := len(StateHistoryAccountBlockPrefix) + common.HashLength + 4
|
||||||
out := make([]byte, totalLen)
|
out := make([]byte, totalLen)
|
||||||
|
|
||||||
off := 0
|
off := 0
|
||||||
|
|
@ -416,7 +416,7 @@ func storageHistoryIndexBlockKey(addressHash common.Hash, storageHash common.Has
|
||||||
var buf4 [4]byte
|
var buf4 [4]byte
|
||||||
binary.BigEndian.PutUint32(buf4[:], blockID)
|
binary.BigEndian.PutUint32(buf4[:], blockID)
|
||||||
|
|
||||||
totalLen := len(StateHistoryStorageBlockPrefix) + len(addressHash) + len(storageHash) + 4
|
totalLen := len(StateHistoryStorageBlockPrefix) + 2*common.HashLength + 4
|
||||||
out := make([]byte, totalLen)
|
out := make([]byte, totalLen)
|
||||||
|
|
||||||
off := 0
|
off := 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue