Skip to content

Commit

Permalink
Send TraceTxSubmissionProcessed for the new TX submission
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
karknu authored and coot committed Oct 3, 2024
1 parent 388cc69 commit efbc13a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ txSubmissionInboundV2
txidsAccepted <- mempoolAddTxs txs
traceWith tracer $
TraceTxInboundAddedToMempool txidsAccepted
let !collected = length txidsAccepted
let !collected = length txs
let !accepted = length txidsAccepted
traceWith tracer $
TraceTxSubmissionCollected collected

traceWith tracer $ TraceTxSubmissionProcessed ProcessedTxCount {
ptxcAccepted = accepted
, ptxcRejected = collected - accepted
}

-- TODO:
-- We can update the state so that other `tx-submission` servers will
-- not try to add these txs to the mempool.
Expand Down

0 comments on commit efbc13a

Please sign in to comment.