Update schema.go

This commit is contained in:
rjl493456442 2025-08-15 20:36:38 +08:00 committed by GitHub
parent 08ee6b45e0
commit 2b098e1a1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -384,7 +384,7 @@ func accountHistoryIndexKey(addressHash common.Hash) []byte {
// storageHistoryIndexKey = StateHistoryStorageMetadataPrefix + addressHash + storageHash
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)
off := 0
@ -400,7 +400,7 @@ func accountHistoryIndexBlockKey(addressHash common.Hash, blockID uint32) []byte
var buf4 [4]byte
binary.BigEndian.PutUint32(buf4[:], blockID)
totalLen := len(StateHistoryAccountBlockPrefix) + len(addressHash) + 4
totalLen := len(StateHistoryAccountBlockPrefix) + common.HashLength + 4
out := make([]byte, totalLen)
off := 0
@ -416,7 +416,7 @@ func storageHistoryIndexBlockKey(addressHash common.Hash, storageHash common.Has
var buf4 [4]byte
binary.BigEndian.PutUint32(buf4[:], blockID)
totalLen := len(StateHistoryStorageBlockPrefix) + len(addressHash) + len(storageHash) + 4
totalLen := len(StateHistoryStorageBlockPrefix) + 2*common.HashLength + 4
out := make([]byte, totalLen)
off := 0