mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-07 11:32:20 +00:00
add state check assert routine
This commit is contained in:
parent
26f543dff8
commit
fbe84f8d5f
@ -568,6 +568,13 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce) error {
|
||||
if byNonce.count(binary.BigEndian.Uint64(id)) > 0 {
|
||||
return nil
|
||||
}
|
||||
tx.ForEach(kv.PooledTransaction, nil, func(k, v []byte) error {
|
||||
senderID := binary.BigEndian.Uint64(v[:8])
|
||||
if senderID == binary.BigEndian.Uint64(id) {
|
||||
panic("why?")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err := tx.Delete(kv.PooledSenderID, addr, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user