Skip to content

Commit 1d40e61

Browse files
committed
WIP: questions & todos
1 parent 7d2b931 commit 1d40e61

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ withPeer tracer
235235
inflightTxs' = foldl' purgeInflightTxs inflightTxs requestedTxsInflight
236236
inflightTxsSize' = inflightTxsSize - requestedTxsInflightSize
237237

238+
-- TODO: describe why we need to add `toMempoolTxs` to `limboTxs`.
238239
limboTxs' =
239240
foldl' (flip $ Map.update
240241
\cnt -> if cnt > 1

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

+2
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ acknowledgeTxIds
145145
, 0
146146
, TxsToMempool []
147147
, RefCountDiff Map.empty
148+
-- Q: why we don't return `toMempoolTxs'` in this case?
148149
, ps
149150
)
150151
where
@@ -241,6 +242,7 @@ tickTimedTxs now st@SharedTxState{ timedTxs
241242
, bufferedTxs } =
242243
let (expiredTxs, timedTxs') = Map.split now timedTxs
243244
expiredTxs' = -- Map.split doesn't include the `now` entry in any map
245+
-- TODO: there must be a better way.
244246
case Map.lookup now timedTxs of
245247
Just txids -> Map.insert now txids expiredTxs
246248
Nothing -> expiredTxs

0 commit comments

Comments
 (0)