fundingmanager: send messages to peers directly
In this commit, we modify the existing message sending functionality within the fundingmanager. Due to each mesage send requiring to hold the server's lock to retrieve the peer, we might run into a case where the lock is held for a larger than usual amount of time and would therefore block on sending the message within the fundingmanager. We remedy this by taking a similar approach to some recent changes within the gossiper. We now keep track of each peer within the internal fundingmanager messages and send messages directly to them.
This commit is contained in:
3 files changed
+117
-152
No files matched your search
@@ -2520,7 +2520,7 @@ func (s *server) OpenChannel(nodeKey *btcec.PublicKey,
|
||||
|
||||
// TODO(roasbeef): pass in chan that's closed if/when funding succeeds
|
||||
// so can track as persistent peer?
|
||||
go s.fundingMgr.initFundingWorkflow(targetPeer.addr, req)
|
||||
go s.fundingMgr.initFundingWorkflow(targetPeer, req)
|
||||
|
||||
return updateChan, errChan
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user