persistence

This commit is contained in:
alex.sharov 2021-08-23 20:20:07 +07:00
parent 5f3c7beca3
commit 33c60ecea8
2 changed files with 4 additions and 0 deletions

View File

@ -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 {

View File

@ -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)