discovery: don't historical sync when NumActiveSyncers == 0

Currently when numgraphsyncpeers=0, lnd will still attempt to perform
an initial historical sync. We change this behavior here to forgoe
historical sync entirely when numgraphsyncpeers is zero, since the
routing table isn't being updated anyway while the node is active.

This permits a no-graph lnd mode where no syncing occurs at all.
This commit is contained in:
Conner Fromknecht committed 2021-02-10 09:35:45 -08:00
1 parent 5cec468ff4
commit 58e924ad1c
3 files changed
+59 -6

No files matched your search

+1 -1
View File
@@ -10398,7 +10398,7 @@ func testGraphTopologyNtfns(net *lntest.NetworkHarness, t *harnessTest, pinned b
var aliceArgs []string
if pinned {
aliceArgs = []string{
"--numgraphsyncpeers=1",
"--numgraphsyncpeers=0",
fmt.Sprintf("--gossip.pinned-syncers=%s", bobPubkey),
}
}