Skip to content

Commit c2b12b0

Browse files
committed
multi: remove RBF co-op close staging feature bits
Now that the final RBF-based co-op close feature bits (rbf-coop-close, bits 60/61) have been in production for a while, the staging feature bits (rbf-coop-close-x, bits 160/161) are no longer needed.
1 parent 1d4c753 commit c2b12b0

4 files changed

Lines changed: 2 additions & 22 deletions

File tree

feature/default_sets.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ var defaultSetDesc = setDesc{
107107
lnwire.ExperimentalAccountabilityOptional: {
108108
SetNodeAnn: {}, // N
109109
},
110-
lnwire.RbfCoopCloseOptionalStaging: {
111-
SetInit: {}, // I
112-
SetNodeAnn: {}, // N
113-
},
114110
lnwire.RbfCoopCloseOptional: {
115111
SetInit: {}, // I
116112
SetNodeAnn: {}, // N

feature/manager.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
224224
raw.Unset(lnwire.ExperimentalAccountabilityRequired)
225225
}
226226
if cfg.NoRbfCoopClose {
227-
raw.Unset(lnwire.RbfCoopCloseOptionalStaging)
228227
raw.Unset(lnwire.RbfCoopCloseOptional)
229228
}
230229
if cfg.NoOnionMessages {

lnwire/features.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,6 @@ const (
241241
// new RBF-based co-op close protocol is supported.
242242
RbfCoopCloseOptional = 61
243243

244-
// RbfCoopCloseRequiredStaging is a required feature bit that signals
245-
// that the new RBF-based co-op close protocol is supported.
246-
RbfCoopCloseRequiredStaging = 160
247-
248-
// RbfCoopCloseOptionalStaging is an optional feature bit that signals
249-
// that the new RBF-based co-op close protocol is supported.
250-
RbfCoopCloseOptionalStaging = 161
251-
252244
// ScriptEnforcedLeaseRequired is a required feature bit that signals
253245
// that the node requires channels having zero-fee second-level HTLC
254246
// transactions, which also imply anchor commitments, along with an
@@ -401,8 +393,6 @@ var Features = map[FeatureBit]string{
401393
Bolt11BlindedPathsRequired: "bolt-11-blinded-paths",
402394
RbfCoopCloseOptional: "rbf-coop-close",
403395
RbfCoopCloseRequired: "rbf-coop-close",
404-
RbfCoopCloseOptionalStaging: "rbf-coop-close-x",
405-
RbfCoopCloseRequiredStaging: "rbf-coop-close-x",
406396
OnionMessagesOptional: "onion-messages",
407397
OnionMessagesRequired: "onion-messages",
408398
}

peer/brontide.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,13 +1092,8 @@ func (p *Brontide) taprootShutdownAllowed() bool {
10921092
// rbfCoopCloseAllowed returns true if both parties have negotiated the new RBF
10931093
// coop close feature.
10941094
func (p *Brontide) rbfCoopCloseAllowed() bool {
1095-
bothHaveBit := func(bit lnwire.FeatureBit) bool {
1096-
return p.RemoteFeatures().HasFeature(bit) &&
1097-
p.LocalFeatures().HasFeature(bit)
1098-
}
1099-
1100-
return bothHaveBit(lnwire.RbfCoopCloseOptional) ||
1101-
bothHaveBit(lnwire.RbfCoopCloseOptionalStaging)
1095+
return p.RemoteFeatures().HasFeature(lnwire.RbfCoopCloseOptional) &&
1096+
p.LocalFeatures().HasFeature(lnwire.RbfCoopCloseOptional)
11021097
}
11031098

11041099
// QuitSignal is a method that should return a channel which will be sent upon

0 commit comments

Comments
 (0)