This commit is contained in:
voidlizard 2024-10-14 08:47:26 +03:00
parent df970b8349
commit 0b9c1f3b4d
1 changed files with 11 additions and 4 deletions

View File

@ -647,6 +647,7 @@ mailboxProtoWorker readConf me@MailboxProtoWorker{..} = do
Left{} -> do
-- here, but lame
err $ red "mailbox (invalid block)"
void $ putBlock sto (serialise (MergedEntry r th))
-- maybe to something more sophisticated
@ -655,10 +656,16 @@ mailboxProtoWorker readConf me@MailboxProtoWorker{..} = do
Right (Deleted (ProofOfDelete{..}) _) -> do
h <- toMPlus deleteMessage
box <- getBlock sto (coerce h)
>>= toMPlus
<&> deserialiseOrFail @(SignedBox (DeleteMessagesPayload s) s)
>>= toMPlus
mbox <- getBlock sto (coerce h)
-- >>= toMPlus
when (isNothing mbox) do
startDownloadStuff me h
warn $ red "<<~~~>>" <+> "Proof not found!" <+> pretty h
box <- toMPlus mbox
<&> deserialiseOrFail @(SignedBox (DeleteMessagesPayload s) s)
>>= toMPlus
debug $ red "<<***>> mailbox:" <+> "found proof of message deleting" <+> pretty h