Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
feat(clist_mempool): add logging around mempool adding
Browse files Browse the repository at this point in the history
  • Loading branch information
Zygimantass committed May 17, 2023
1 parent c490beb commit 798fdcb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mempool/v0/clist_mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (mem *CListMempool) resCbFirstTime(
}
memTx.senders.Store(peerID, true)
mem.addTx(memTx)
mem.logger.Debug(
mem.logger.Info(
"added good transaction",
"tx", types.Tx(tx).Hash(),
"res", r,
Expand All @@ -416,8 +416,10 @@ func (mem *CListMempool) resCbFirstTime(
_, err := mem.stats[peerP2PID]

if err {
mem.logger.Info("not seen transaction (new peer)", types.Tx(tx).Hash(), "from", peerP2PID)
mem.stats[peerP2PID] = 1
} else {
mem.logger.Info("not seen transaction (existing peer)", types.Tx(tx).Hash(), "from", peerP2PID)
mem.stats[peerP2PID] += 1
}
} else {
Expand Down

0 comments on commit 798fdcb

Please sign in to comment.