mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
8492b41087
commit
717f24deab
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue