mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
fix test again
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
15d22b1db5
commit
501dd0535c
1 changed files with 6 additions and 3 deletions
|
|
@ -199,15 +199,18 @@ func TestBatchIndexerWrite(t *testing.T) {
|
||||||
storages = make(map[common.Hash]map[common.Hash][]uint64)
|
storages = make(map[common.Hash]map[common.Hash][]uint64)
|
||||||
)
|
)
|
||||||
for i, h := range histories {
|
for i, h := range histories {
|
||||||
for _, addr := range h.accountList {
|
for addr := range h.accounts {
|
||||||
addrHash := crypto.Keccak256Hash(addr.Bytes())
|
addrHash := crypto.Keccak256Hash(addr.Bytes())
|
||||||
accounts[addrHash] = append(accounts[addrHash], uint64(i+1))
|
accounts[addrHash] = append(accounts[addrHash], uint64(i+1))
|
||||||
|
|
||||||
if _, ok := storages[addrHash]; !ok {
|
if _, ok := storages[addrHash]; !ok {
|
||||||
storages[addrHash] = make(map[common.Hash][]uint64)
|
storages[addrHash] = make(map[common.Hash][]uint64)
|
||||||
}
|
}
|
||||||
for _, slot := range h.storageList[addr] {
|
slots, ok := h.storages[addr]
|
||||||
storages[addrHash][slot] = append(storages[addrHash][slot], uint64(i+1))
|
if ok {
|
||||||
|
for slot := range slots {
|
||||||
|
storages[addrHash][slot] = append(storages[addrHash][slot], uint64(i+1))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue