mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 03:51:20 +00:00
add state check assert routine
This commit is contained in:
parent
5c20bb6acf
commit
d8ef509ab1
@ -588,6 +588,7 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
justInserted := []uint64{}
|
||||||
for addr, id := range sc.senderIDs {
|
for addr, id := range sc.senderIDs {
|
||||||
binary.BigEndian.PutUint64(encID, id)
|
binary.BigEndian.PutUint64(encID, id)
|
||||||
currentV, err := tx.GetOne(kv.PooledSenderID, []byte(addr))
|
currentV, err := tx.GetOne(kv.PooledSenderID, []byte(addr))
|
||||||
@ -604,6 +605,7 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa
|
|||||||
if err := tx.Put(kv.PooledSenderIDToAdress, encID, []byte(addr)); err != nil {
|
if err := tx.Put(kv.PooledSenderIDToAdress, encID, []byte(addr)); err != nil {
|
||||||
return evicted, err
|
return evicted, err
|
||||||
}
|
}
|
||||||
|
justInserted = append(justInserted, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
v := make([]byte, 8, 8+32)
|
v := make([]byte, 8, 8+32)
|
||||||
@ -628,6 +630,7 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa
|
|||||||
fmt.Printf("now: %d\n", sc.senderID)
|
fmt.Printf("now: %d\n", sc.senderID)
|
||||||
fmt.Printf("not foundd: %d,%x,%x,%x\n", binary.BigEndian.Uint64(v[:8]), k, v, vv)
|
fmt.Printf("not foundd: %d,%x,%x,%x\n", binary.BigEndian.Uint64(v[:8]), k, v, vv)
|
||||||
fmt.Printf("aa: %x,%x,%x\n", k, v, vv)
|
fmt.Printf("aa: %x,%x,%x\n", k, v, vv)
|
||||||
|
fmt.Printf("justDeleted:%d, justInserted:%d\n", justDeleted, justInserted)
|
||||||
panic("no-no")
|
panic("no-no")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user