Skip to content

Commit e9def01

Browse files
committed
lncfg: disable allowing blinded routes in daemon but not itests
This commit turns off route blinding for the daemon while we're waiting on full handling for blinded errors. The feature remains on for itests so that tests covering blinding can run as usual.
1 parent e43651b commit e9def01

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

Diff for: config.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,9 @@ func DefaultConfig() Config {
626626
RejectCacheSize: channeldb.DefaultRejectCacheSize,
627627
ChannelCacheSize: channeldb.DefaultChannelCacheSize,
628628
},
629-
Prometheus: lncfg.DefaultPrometheus(),
630-
Watchtower: lncfg.DefaultWatchtowerCfg(defaultTowerDir),
629+
Prometheus: lncfg.DefaultPrometheus(),
630+
Watchtower: lncfg.DefaultWatchtowerCfg(defaultTowerDir),
631+
ProtocolOptions: lncfg.DefaultProtocol(),
631632
HealthChecks: &lncfg.HealthCheckConfig{
632633
ChainCheck: &lncfg.CheckConfig{
633634
Interval: defaultChainInterval,

Diff for: lncfg/protocol.go

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ type ProtocolOptions struct {
5959
NoRouteBlindingOption bool `long:"no-route-blinding" description:"do not forward payments that are a part of a blinded route"`
6060
}
6161

62+
// DefaultProtocol returns a protocol config with route blinding turned off,
63+
// temporarily in place until full handling of blinded route errors is merged.
64+
func DefaultProtocol() *ProtocolOptions {
65+
return &ProtocolOptions{
66+
NoRouteBlindingOption: true,
67+
}
68+
}
69+
6270
// Wumbo returns true if lnd should permit the creation and acceptance of wumbo
6371
// channels.
6472
func (l *ProtocolOptions) Wumbo() bool {

Diff for: lncfg/protocol_integration.go

+7
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ type ProtocolOptions struct {
6262
NoRouteBlindingOption bool `long:"no-route-blinding" description:"do not forward payments that are a part of a blinded route"`
6363
}
6464

65+
// DefaultProtocol returns a protocol config with route blinding turned on,
66+
// so that itests can run against route blinding features even while we've
67+
// got it turned off for the daemon (pending completion of error handling).
68+
func DefaultProtocol() *ProtocolOptions {
69+
return &ProtocolOptions{}
70+
}
71+
6572
// Wumbo returns true if lnd should permit the creation and acceptance of wumbo
6673
// channels.
6774
func (l *ProtocolOptions) Wumbo() bool {

0 commit comments

Comments
 (0)