Skip to content

Commit aa064d9

Browse files
karknucoot
authored andcommitted
Send TraceTxSubmissionProcessed for the new TX submission
Send TraceTxSubmissionProcessed for the new TX submission protocol. Fix count for TraceTxSubmissionCollected, it should be number of TXs "collected", not number of TXs accepted by the mempool.
1 parent 1deb340 commit aa064d9

File tree

1 file changed

+8
-1
lines changed
  • ouroboros-network/src/Ouroboros/Network/TxSubmission/Inbound

1 file changed

+8
-1
lines changed

ouroboros-network/src/Ouroboros/Network/TxSubmission/Inbound/Server.hs

+8-1
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,16 @@ txSubmissionInboundV2
7373
txidsAccepted <- mempoolAddTxs txs
7474
traceWith tracer $
7575
TraceTxInboundAddedToMempool txidsAccepted
76-
let !collected = length txidsAccepted
76+
let !collected = length txs
77+
let !accepted = length txidsAccepted
7778
traceWith tracer $
7879
TraceTxSubmissionCollected collected
80+
81+
traceWith tracer $ TraceTxSubmissionProcessed ProcessedTxCount {
82+
ptxcAccepted = accepted
83+
, ptxcRejected = collected - accepted
84+
}
85+
7986
-- TODO:
8087
-- We can update the state so that other `tx-submission` servers will
8188
-- not try to add these txs to the mempool.

0 commit comments

Comments
 (0)