move protocol version stuff to the Net free monad
Needs to be in Net not Local, so that Net actions can take the protocol version into account. This commit was sponsored by an anonymous bitcoin donor.
This commit is contained in:
parent
c81768d425
commit
596af7cbc4
9 changed files with 61 additions and 52 deletions
|
@ -148,7 +148,7 @@ openConnection u addr = do
|
|||
--P2P.negotiateProtocolVersion P2P.maxProtocolVersion
|
||||
return ()
|
||||
runst <- liftIO $ mkRunState Client
|
||||
res <- runFullProto runst conn proto
|
||||
res <- liftIO $ runNetProto runst conn proto
|
||||
case res of
|
||||
Right (Just theiruuid)
|
||||
| u == theiruuid -> return (OpenConnection (runst, conn))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue