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
f29bd31d33
commit
b9665c8347
@ -569,6 +569,7 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa
|
|||||||
if sc.commitID-binary.BigEndian.Uint64(k) < 5 {
|
if sc.commitID-binary.BigEndian.Uint64(k) < 5 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
fmt.Printf("del:%d\n", binary.BigEndian.Uint64(k))
|
||||||
for i := 0; i < len(v); i += 8 {
|
for i := 0; i < len(v); i += 8 {
|
||||||
senderID := binary.BigEndian.Uint64(v[i : i+8])
|
senderID := binary.BigEndian.Uint64(v[i : i+8])
|
||||||
if _, ok := sc.senderInfo[senderID]; ok {
|
if _, ok := sc.senderInfo[senderID]; ok {
|
||||||
@ -584,7 +585,6 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa
|
|||||||
if _, ok := sc.senderIDs[string(addr)]; ok {
|
if _, ok := sc.senderIDs[string(addr)]; ok {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
fmt.Printf("del:%d\n", senderID)
|
|
||||||
if err := tx.Delete(kv.PooledSenderID, addr, nil); err != nil {
|
if err := tx.Delete(kv.PooledSenderID, addr, nil); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -611,7 +611,7 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa
|
|||||||
if currentV != nil && bytes.Equal(currentV, encID) {
|
if currentV != nil && bytes.Equal(currentV, encID) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
fmt.Printf("Put: %d\n", id)
|
//fmt.Printf("Put: %d\n", id)
|
||||||
if err := tx.Put(kv.PooledSenderID, []byte(addr), encID); err != nil {
|
if err := tx.Put(kv.PooledSenderID, []byte(addr), encID); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user