diff --git a/discovery/gossiper.go b/discovery/gossiper.go index 9cff71c6e..d9288f766 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -364,6 +364,11 @@ type Config struct { // updates for a channel and returns true if the channel should be // considered a zombie based on these timestamps. IsStillZombieChannel func(time.Time, time.Time) bool + + // AssumeChannelValid toggles whether the gossiper will check for + // spent-ness of channel outpoints. For neutrino, this saves long + // rescans from blocking initial usage of the daemon. + AssumeChannelValid bool } // processedNetworkMsg is a wrapper around networkMsg and a boolean. It is diff --git a/server.go b/server.go index d71ebc032..f85d60f52 100644 --- a/server.go +++ b/server.go @@ -1142,6 +1142,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr, FindChannel: s.findChannel, IsStillZombieChannel: s.graphBuilder.IsZombieChannel, ScidCloser: scidCloserMan, + AssumeChannelValid: cfg.Routing.AssumeChannelValid, }, nodeKeyDesc) selfVertex := route.Vertex(nodeKeyDesc.PubKey.SerializeCompressed())