discovery: use a no-op hash accumluator for local networks

If LND is running on a local network, then use deterministic sampling so
that we can have deterministic peer bootstrapping.
This commit is contained in:
Elle Mouton committed 2025-07-01 11:27:18 +02:00
1 parent 339dd0c1a7
commit 37d6390642
3 files changed
+51 -8

No files matched your search

+3 -1
View File
@@ -3064,7 +3064,9 @@ func initNetworkBootstrappers(s *server) ([]discovery.NetworkPeerBootstrapper, e
// this can be used by default if we've already partially seeded the
// network.
chanGraph := autopilot.ChannelGraphFromDatabase(s.graphDB)
graphBootstrapper, err := discovery.NewGraphBootstrapper(chanGraph)
graphBootstrapper, err := discovery.NewGraphBootstrapper(
chanGraph, s.cfg.Bitcoin.IsLocalNetwork(),
)
if err != nil {
return nil, err
}