mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-17 05:37:49 +02:00
feature: add new NoRbfCoopClose option
This commit is contained in:
@@ -63,6 +63,10 @@ type Config struct {
|
|||||||
// NoRouteBlinding unsets route blinding feature bits.
|
// NoRouteBlinding unsets route blinding feature bits.
|
||||||
NoRouteBlinding bool
|
NoRouteBlinding bool
|
||||||
|
|
||||||
|
// RbfCoopClose unsets any bits that signal support for using RBF for
|
||||||
|
// coop close.
|
||||||
|
NoRbfCoopClose bool
|
||||||
|
|
||||||
// CustomFeatures is a set of custom features to advertise in each
|
// CustomFeatures is a set of custom features to advertise in each
|
||||||
// set.
|
// set.
|
||||||
CustomFeatures map[Set][]lnwire.FeatureBit
|
CustomFeatures map[Set][]lnwire.FeatureBit
|
||||||
@@ -192,6 +196,11 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
|||||||
raw.Unset(lnwire.Bolt11BlindedPathsOptional)
|
raw.Unset(lnwire.Bolt11BlindedPathsOptional)
|
||||||
raw.Unset(lnwire.Bolt11BlindedPathsRequired)
|
raw.Unset(lnwire.Bolt11BlindedPathsRequired)
|
||||||
}
|
}
|
||||||
|
if cfg.NoRbfCoopClose {
|
||||||
|
raw.Unset(lnwire.ShutdownAnySegwitOptional)
|
||||||
|
raw.Unset(lnwire.RbfCoopCloseOptionalStaging)
|
||||||
|
}
|
||||||
|
|
||||||
for _, custom := range cfg.CustomFeatures[set] {
|
for _, custom := range cfg.CustomFeatures[set] {
|
||||||
if custom > set.Maximum() {
|
if custom > set.Maximum() {
|
||||||
return nil, fmt.Errorf("feature bit: %v "+
|
return nil, fmt.Errorf("feature bit: %v "+
|
||||||
|
Reference in New Issue
Block a user