This commit is contained in:
Dmitry Zuikov 2023-01-22 13:02:21 +03:00
parent 8492b41087
commit 717f24deab
2 changed files with 3 additions and 2 deletions

View File

@ -333,11 +333,12 @@ instance ( HasProtocol e p
thatPeer _ = asks (view answTo)
deferred _ action = do
me <- lift $ ownPeer @e
who <- asks (view answTo)
fab <- lift $ getFabriq @e
pip <- lift $ asks (view envDeferred)
ss <- lift getStorage
liftIO $ addJob pip $ runPeerM ss fab who (runResponseM who action)
liftIO $ addJob pip $ runPeerM ss fab me (runResponseM who action)
response msg = do
let proto = protoId @e @p (Proxy @p)

View File

@ -93,7 +93,6 @@ type instance SessionData e (BlockChunks e) = BlockDownload
newtype instance SessionKey e (BlockChunks e) =
DownloadSessionKey (Peer e, Cookie e)
deriving stock (Generic,Typeable)
deriving newtype (Hashable)
newtype BlockSizeSession e =
BlockSizeSession
@ -259,6 +258,7 @@ mkAdapter cww = do
when ( h1 == h ) $ do
liftIO $ commitBlock cww cKey h
expire cKey
debug $ "BLOCK IS READY" <+> pretty h
-- FIXME: return this event!
-- lift $ runEngineM env $ emitBlockReadyEvent ev h -- TODO: fix this crazy shit