mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 22:50:58 +02:00
discovery: fix mocked peer in unit tests
The mocked peer used here blocks on `sendToPeer`, which is not the behavior of the `SendMessageLazy` of `lnpeer.Peer`. To reflect the reality, we now make sure the `sendToPeer` is non-blocking in the tests.
This commit is contained in:
@@ -495,6 +495,8 @@ func (g *GossipSyncer) handleSyncingChans() {
|
||||
g.Lock()
|
||||
defer g.Unlock()
|
||||
|
||||
// Send the msg to the remote peer, which is non-blocking as
|
||||
// `sendToPeer` only queues the msg in Brontide.
|
||||
err = g.cfg.sendToPeer(queryRangeMsg)
|
||||
if err != nil {
|
||||
log.Errorf("Unable to send chan range query: %v", err)
|
||||
|
Reference in New Issue
Block a user