mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-05-18 15:50:06 +02:00
discovery: add AssumeChannelValid config option
in preparation for later on when we need to know when to skip funding transaction validation.
This commit is contained in:
parent
00f5fd9b7f
commit
22e391f055
@ -364,6 +364,11 @@ type Config struct {
|
|||||||
// updates for a channel and returns true if the channel should be
|
// updates for a channel and returns true if the channel should be
|
||||||
// considered a zombie based on these timestamps.
|
// considered a zombie based on these timestamps.
|
||||||
IsStillZombieChannel func(time.Time, time.Time) bool
|
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
|
// processedNetworkMsg is a wrapper around networkMsg and a boolean. It is
|
||||||
|
@ -1142,6 +1142,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
FindChannel: s.findChannel,
|
FindChannel: s.findChannel,
|
||||||
IsStillZombieChannel: s.graphBuilder.IsZombieChannel,
|
IsStillZombieChannel: s.graphBuilder.IsZombieChannel,
|
||||||
ScidCloser: scidCloserMan,
|
ScidCloser: scidCloserMan,
|
||||||
|
AssumeChannelValid: cfg.Routing.AssumeChannelValid,
|
||||||
}, nodeKeyDesc)
|
}, nodeKeyDesc)
|
||||||
|
|
||||||
selfVertex := route.Vertex(nodeKeyDesc.PubKey.SerializeCompressed())
|
selfVertex := route.Vertex(nodeKeyDesc.PubKey.SerializeCompressed())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user