From 73ad34716fa3672349f02932c46540fe56717537 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Sat, 28 Aug 2021 10:53:06 +0700 Subject: [PATCH] add state check assert routine --- txpool/pool.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/txpool/pool.go b/txpool/pool.go index c0bfc521e..bf94952ee 100644 --- a/txpool/pool.go +++ b/txpool/pool.go @@ -594,7 +594,9 @@ func (sc *SendersCache) flush(tx kv.RwTx, byNonce *ByNonce, sendersWithoutTransa if len(vv) == 0 { cc, _ := tx.Cursor(kv.PooledSenderIDToAdress) last, lastAddr, _ := cc.Last() - fmt.Printf("last: %d,%x\n", binary.BigEndian.Uint64(last), lastAddr) + if len(last) > 0 { + 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)