mirror of https://github.com/voidlizard/hbs2
wip, debug
This commit is contained in:
parent
4ef086b8d2
commit
027c45fe2c
|
@ -610,6 +610,14 @@ mailboxProtoWorker readConf me@MailboxProtoWorker{..} = do
|
|||
debug $ "mailbox/debug: drop state" <+> pretty pk <+> pretty mailboxStatusRef
|
||||
atomically $ modifyTVar inMailboxDownloadQ (HM.delete pk)
|
||||
|
||||
-- FIXME: assume-huge-mailboxes
|
||||
|
||||
walkMerkle @[HashRef] (coerce mailboxStatusRef) (getBlock mpwStorage) $ \case
|
||||
Left what -> err $ red "mailbox: missed block for tree" <+> pretty mailboxStatusRef
|
||||
Right hs -> void $ runMaybeT do
|
||||
for_ hs $ \h -> do
|
||||
debug $ red ">>>" <+> "MERGE MAILBOX ENTRY" <+> pretty h
|
||||
|
||||
mailboxFetchQ dbe = forever do
|
||||
toFetch <- atomically $ do
|
||||
q <- readTVar mpwFetchQ
|
||||
|
|
|
@ -10,8 +10,7 @@ import Data.Hashable
|
|||
|
||||
data ProofOfDelete =
|
||||
ProofOfDelete
|
||||
{ deletePolicy :: Maybe HashRef
|
||||
, deleteMessage :: Maybe HashRef
|
||||
{ deleteMessage :: Maybe HashRef
|
||||
}
|
||||
deriving stock (Generic,Eq,Ord,Show)
|
||||
|
||||
|
@ -22,10 +21,10 @@ data ProofOfExist =
|
|||
deriving stock (Generic,Eq,Ord,Show)
|
||||
|
||||
instance Monoid ProofOfDelete where
|
||||
mempty = ProofOfDelete mzero mzero
|
||||
mempty = ProofOfDelete mzero
|
||||
|
||||
instance Semigroup ProofOfDelete where
|
||||
(<>) (ProofOfDelete a1 b1) (ProofOfDelete a2 b2) = ProofOfDelete (a1 <|> a2) (b1 <|> b2)
|
||||
(<>) (ProofOfDelete a1) (ProofOfDelete a2) = ProofOfDelete (a1 <|> a2)
|
||||
|
||||
instance Monoid ProofOfExist where
|
||||
mempty = ProofOfExist mzero
|
||||
|
|
Loading…
Reference in New Issue