mirror of https://github.com/voidlizard/hbs2
wip, debug
This commit is contained in:
parent
3fde72e230
commit
df970b8349
|
@ -635,19 +635,24 @@ mailboxProtoWorker readConf me@MailboxProtoWorker{..} = do
|
||||||
modifyTVar inMessageMergeQueue (HM.delete r)
|
modifyTVar inMessageMergeQueue (HM.delete r)
|
||||||
pure n
|
pure n
|
||||||
|
|
||||||
|
wipTx <- newTVarIO HS.empty
|
||||||
|
|
||||||
newTxProvenL <- S.toList_ $
|
newTxProvenL <- S.toList_ $
|
||||||
for_ newTx $ \th -> void $ runMaybeT do
|
for_ newTx $ \th -> void $ runMaybeT do
|
||||||
|
|
||||||
tx <- getBlock sto (coerce th)
|
tx <- getBlock sto (coerce th)
|
||||||
>>= toMPlus
|
>>= toMPlus
|
||||||
<&> deserialiseOrFail @MailboxEntry
|
|
||||||
>>= toMPlus
|
|
||||||
|
|
||||||
case tx of
|
case deserialiseOrFail tx of
|
||||||
|
|
||||||
|
Left{} -> do
|
||||||
|
-- here, but lame
|
||||||
|
void $ putBlock sto (serialise (MergedEntry r th))
|
||||||
|
|
||||||
-- maybe to something more sophisticated
|
-- maybe to something more sophisticated
|
||||||
Exists{} -> lift $ S.yield th
|
Right (Exists{}) -> lift $ S.yield th
|
||||||
|
|
||||||
Deleted (ProofOfDelete{..}) _ -> do
|
Right (Deleted (ProofOfDelete{..}) _) -> do
|
||||||
h <- toMPlus deleteMessage
|
h <- toMPlus deleteMessage
|
||||||
|
|
||||||
box <- getBlock sto (coerce h)
|
box <- getBlock sto (coerce h)
|
||||||
|
@ -679,7 +684,7 @@ mailboxProtoWorker readConf me@MailboxProtoWorker{..} = do
|
||||||
updateRef sto r nref
|
updateRef sto r nref
|
||||||
debug $ yellow "mailbox updated" <+> pretty r <+> pretty nref
|
debug $ yellow "mailbox updated" <+> pretty r <+> pretty nref
|
||||||
|
|
||||||
for_ newTx $ \t -> do
|
for_ newTxProven $ \t -> do
|
||||||
-- FIXME: use-bloom-filter-or-something
|
-- FIXME: use-bloom-filter-or-something
|
||||||
-- $class: leak
|
-- $class: leak
|
||||||
putBlock sto (serialise (MergedEntry r t))
|
putBlock sto (serialise (MergedEntry r t))
|
||||||
|
|
Loading…
Reference in New Issue