add state check assert routine

This commit is contained in:
alex.sharov 2021-08-27 17:18:29 +07:00
parent 92740a3935
commit 0e42c04b6c

View File

@ -640,12 +640,11 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa
return err
}
if len(vv) == 0 {
tx.ForEach(kv.PooledSenderIDToAdress, nil, func(k, vvvv []byte) error {
if bytes.HasPrefix(k, v[:7]) {
fmt.Printf("found:%x,%x\n", k, vvvv)
}
return nil
})
cc, _ := tx.Cursor(kv.PooledSenderIDToAdress)
last, lastAddr, _ := cc.Last()
fmt.Printf("last: %d,%x\n", binary.BigEndian.Uint64(last), lastAddr)
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("aa: %x,%x,%x\n", k, v, vv)
panic("no-no")
}