From 13965918beb89ee25b1bd395110e6b0209443199 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Sat, 28 Aug 2021 09:39:16 +0700 Subject: [PATCH] add state check assert routine --- txpool/pool.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/txpool/pool.go b/txpool/pool.go index 1d2cf1b8d..808af24a8 100644 --- a/txpool/pool.go +++ b/txpool/pool.go @@ -554,6 +554,7 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa } fmt.Printf("del:%d,%d,%d\n", binary.BigEndian.Uint64(k), sc.commitID, evicted) if sc.commitID-binary.BigEndian.Uint64(k) < 5 { + fmt.Printf("del break:%d,%d,%d\n", binary.BigEndian.Uint64(k), sc.commitID, evicted) break } for i := 0; i < len(v); i += 8 { @@ -668,6 +669,7 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa } //TODO: flush and evict + fmt.Printf("senders flush finish\n") return nil } @@ -1078,6 +1080,7 @@ func (p *TxPool) flush(tx kv.RwTx, senders *SendersCache) error { } if err := senders.flush(tx, p.txNonce2Tx, sendersWithoutTransactions); err != nil { + panic(err) return err }