File tree Expand file tree Collapse file tree
lib/Ouroboros/Network/TxSubmission/Inbound/V2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!--
2+ A new scriv changelog fragment.
3+
4+ Uncomment the section that is right (remove the HTML comment wrapper).
5+ For top level release notes, leave all the headers commented out.
6+ -->
7+
8+ ### Breaking
9+
10+ - ` submitTxToMempool ` returns the ` TxMempoolResult `
11+
12+ <!--
13+ ### Non-Breaking
14+
15+ - A bullet item for the Non-Breaking category.
16+
17+ -->
18+ <!--
19+ ### Patch
20+
21+ - A bullet item for the Patch category.
22+
23+ -->
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ module Ouroboros.Network.TxSubmission.Inbound.V2.Registry
88 ( TxChannels (.. )
99 , TxChannelsVar
1010 , TxMempoolSem
11+ , TxMempoolResult (.. )
1112 , SharedTxStateVar
1213 , newSharedTxStateVar
1314 , newTxChannelsVar
@@ -85,7 +86,7 @@ data PeerTxAPI m txid tx = PeerTxAPI {
8586 -- ^ handle received txs
8687
8788 submitTxToMempool :: Tracer m (TraceTxSubmissionInbound txid tx )
88- -> txid -> tx -> m ()
89+ -> txid -> tx -> m TxMempoolResult
8990 -- ^ submit the given (txid, tx) to the mempool.
9091 }
9192
@@ -248,7 +249,7 @@ withPeer tracer
248249 -- PeerTxAPI
249250 --
250251
251- submitTxToMempool :: Tracer m (TraceTxSubmissionInbound txid tx ) -> txid -> tx -> m ()
252+ submitTxToMempool :: Tracer m (TraceTxSubmissionInbound txid tx ) -> txid -> tx -> m TxMempoolResult
252253 submitTxToMempool txTracer txid tx =
253254 bracket_ (atomically $ waitTSem mempoolSem)
254255 (atomically $ signalTSem mempoolSem)
@@ -261,6 +262,7 @@ withPeer tracer
261262 case res of
262263 TxAccepted -> traceWith txTracer (TraceTxInboundAddedToMempool [txid] duration)
263264 TxRejected -> traceWith txTracer (TraceTxInboundRejectedFromMempool [txid] duration)
265+ return res
264266
265267 where
266268 -- add the tx to the mempool
You can’t perform that action at this time.
0 commit comments