From 33c60ecea802eeb1e3772c070faabfc64da34658 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Mon, 23 Aug 2021 20:20:07 +0700 Subject: [PATCH] persistence --- txpool/pool.go | 3 +++ txpool/types.go | 1 + 2 files changed, 4 insertions(+) diff --git a/txpool/pool.go b/txpool/pool.go index badc07a07..d688b3387 100644 --- a/txpool/pool.go +++ b/txpool/pool.go @@ -128,6 +128,8 @@ func NewSendersCache() *SendersCache { senderInfo: map[uint64]*senderInfo{}, } } + +//nolint func (sc *SendersCache) printDebug(prefix string) { fmt.Printf("%s.SendersCache.senderInfo\n", prefix) for i, j := range sc.senderInfo { @@ -475,6 +477,7 @@ func New(newTxs chan Hashes, db kv.RwDB) (*TxPool, error) { }, nil } +//nolint func (p *TxPool) printDebug(prefix string) { fmt.Printf("%s.pool.byHash\n", prefix) for _, j := range p.byHash { diff --git a/txpool/types.go b/txpool/types.go index 1968c53fc..8e99f140c 100644 --- a/txpool/types.go +++ b/txpool/types.go @@ -489,6 +489,7 @@ func bytesToUint64(buf []byte) (x uint64) { return } +//nolint func (tx *TxSlot) printDebug(prefix string) { fmt.Printf("%s: senderID=%d,nonce=%d,tip=%d,v=%d\n", prefix, tx.senderID, tx.nonce, tx.tip, tx.value.Uint64()) //fmt.Printf("%s: senderID=%d,nonce=%d,tip=%d,hash=%x\n", prefix, tx.senderID, tx.nonce, tx.tip, tx.idHash)