fix eth/protocols/snap/sync_test.go (#590)

This commit is contained in:
HAOYUatHZ 2023-12-07 19:04:12 +08:00 committed by GitHub
parent 60216e44c3
commit 23ca4d58a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1582,8 +1582,8 @@ func makeBoundaryAccountTrie(scheme string, n int) (string, *trie.Trie, []*kv) {
Nonce: uint64(0), Nonce: uint64(0),
Balance: big.NewInt(int64(i)), Balance: big.NewInt(int64(i)),
Root: types.EmptyRootHash, Root: types.EmptyRootHash,
KeccakCodeHash: getKeccakCodeHash(i), KeccakCodeHash: getKeccakCodeHash(uint64(i)),
PoseidonCodeHash: getPoseidonCodeHash(i), PoseidonCodeHash: getPoseidonCodeHash(uint64(i)),
}) })
elem := &kv{boundaries[i].Bytes(), value} elem := &kv{boundaries[i].Bytes(), value}
accTrie.MustUpdate(elem.k, elem.v) accTrie.MustUpdate(elem.k, elem.v)
@ -1628,10 +1628,10 @@ func makeAccountTrieWithStorageWithUniqueStorage(scheme string, accounts, slots
// Create n accounts in the trie // Create n accounts in the trie
for i := uint64(1); i <= uint64(accounts); i++ { for i := uint64(1); i <= uint64(accounts); i++ {
key := key32(i) key := key32(i)
keccakCodehash := types.EmptyKeccakCodeHash.Bytes() keccakCodeHash := types.EmptyKeccakCodeHash.Bytes()
poseidonCodeHash := types.EmptyPoseidonCodeHash.Bytes() poseidonCodeHash := types.EmptyPoseidonCodeHash.Bytes()
if code { if code {
keccakCodehash = getKeccakCodeHash(i) keccakCodeHash = getKeccakCodeHash(i)
poseidonCodeHash = getPoseidonCodeHash(i) poseidonCodeHash = getPoseidonCodeHash(i)
} }
// Create a storage trie // Create a storage trie