Skip to content

Commit 22e391f

Browse files
committed
discovery: add AssumeChannelValid config option
in preparation for later on when we need to know when to skip funding transaction validation.
1 parent 00f5fd9 commit 22e391f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

discovery/gossiper.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,11 @@ type Config struct {
364364
// updates for a channel and returns true if the channel should be
365365
// considered a zombie based on these timestamps.
366366
IsStillZombieChannel func(time.Time, time.Time) bool
367+
368+
// AssumeChannelValid toggles whether the gossiper will check for
369+
// spent-ness of channel outpoints. For neutrino, this saves long
370+
// rescans from blocking initial usage of the daemon.
371+
AssumeChannelValid bool
367372
}
368373

369374
// processedNetworkMsg is a wrapper around networkMsg and a boolean. It is

server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
11421142
FindChannel: s.findChannel,
11431143
IsStillZombieChannel: s.graphBuilder.IsZombieChannel,
11441144
ScidCloser: scidCloserMan,
1145+
AssumeChannelValid: cfg.Routing.AssumeChannelValid,
11451146
}, nodeKeyDesc)
11461147

11471148
selfVertex := route.Vertex(nodeKeyDesc.PubKey.SerializeCompressed())

0 commit comments

Comments
 (0)