File tree 4 files changed +8
-9
lines changed
protocol-tests/Ouroboros/Network/Protocol/TxSubmission
4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ directPipelined (TxSubmissionServerPipelined mserver)
53
53
directSender q (SendMsgRequestTxsPipelined txids serverNext)
54
54
ClientStIdle {recvMsgRequestTxs} = do
55
55
server' <- serverNext
56
- SendMsgReplyTxs txs onTxsSent client ' <- recvMsgRequestTxs txids
57
- _ <- onTxsSent txs
56
+ SendMsgReplyTxs txs mClient ' <- recvMsgRequestTxs txids
57
+ client' <- mClient'
58
58
directSender (enqueue (CollectTxs txids txs) q) server' client'
59
59
60
60
directSender q (CollectPipelined (Just server') _) client =
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ txSubmissionClient tracer txId txSize maxUnacked =
141
141
traceWith tracer (EventRecvMsgRequestTxs unackedSeq unackedMap
142
142
remainingTxs txids)
143
143
case [ txid | txid <- txids, txid `Map.notMember` unackedMap ] of
144
- [] -> pure (SendMsgReplyTxs txs (const $ pure () ) client')
144
+ [] -> pure (SendMsgReplyTxs txs (pure client') )
145
145
where
146
146
txs = map (unackedMap Map. ! ) txids
147
147
client' = client unackedSeq unackedMap' remainingTxs
Original file line number Diff line number Diff line change @@ -80,8 +80,7 @@ data ClientStTxIds blocking txid tx m a where
80
80
81
81
data ClientStTxs txid tx m a where
82
82
SendMsgReplyTxs :: [tx ]
83
- -> ([tx ] -> m () )
84
- -> ClientStIdle txid tx m a
83
+ -> m (ClientStIdle txid tx m a )
85
84
-> ClientStTxs txid tx m a
86
85
87
86
@@ -111,7 +110,7 @@ txSubmissionClientPeer (TxSubmissionClient client) =
111
110
(Done TokDone result)
112
111
113
112
MsgRequestTxs txids -> Effect $ do
114
- SendMsgReplyTxs txs onTxsSent k <- recvMsgRequestTxs txids
113
+ SendMsgReplyTxs txs k <- recvMsgRequestTxs txids
115
114
return $ Yield (ClientAgency TokTxs )
116
115
(MsgReplyTxs txs)
117
- (Effect $ onTxsSent txs >> return (go k) )
116
+ (Effect $ k >>= return . go )
Original file line number Diff line number Diff line change @@ -190,6 +190,6 @@ txSubmissionOutbound tracer maxUnacked TxSubmissionMempoolReader{..} =
190
190
client' = client unackedSeq unackedMap' lastIdx
191
191
192
192
-- Trace the transactions to be sent in the response.
193
- traceTxsSent = traceWith tracer . TraceTxSubmissionOutboundSendMsgReplyTxs
193
+ traceTxsSent = traceWith tracer ( TraceTxSubmissionOutboundSendMsgReplyTxs txs)
194
194
195
- return $ SendMsgReplyTxs txs traceTxsSent client'
195
+ return $ SendMsgReplyTxs txs ( traceTxsSent >> pure client')
You can’t perform that action at this time.
0 commit comments