mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 23:21:12 +02:00
discovery: queue active syncers until initial historical sync signal
In this commit, we begin to queue any active syncers until the initial historical sync has completed. We do this to ensure we can properly handle any new channel updates at tip. This is required for fresh nodes that are syncing the channel graph for the first time. If we begin accepting updates at tip while the initial historical sync is still ongoing, then we risk not processing certain updates since we've yet to learn of the channels themselves.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package discovery
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
@@ -30,6 +31,7 @@ func (p *mockPeer) SendMessage(_ bool, msgs ...lnwire.Message) error {
|
||||
select {
|
||||
case p.sentMsgs <- msg:
|
||||
case <-p.quit:
|
||||
return errors.New("peer disconnected")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user