Skip to content

Commit

Permalink
config: actually deprecate --experimental-anchors.
Browse files Browse the repository at this point in the history
Document and enforce the --experimental-anchors deprecation, which was somehow missed in v24.02

Changelog-Deprecated: Config: the --experimental-anchors option is ignored (on by default since v24.02).
  • Loading branch information
rustyrussell authored and vincenzopalazzo committed Jul 9, 2024
1 parent 0c7ce27 commit 991f6dc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions doc/developers-guide/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ hidden: false
| commando-listrunes | Command | v23.08 | v25.02 | replaced with `lightning-showrunes` |
| commando-blacklist | Command | v23.08 | v25.02 | replaced with `lightning-blacklistrune` |
| listpeers.features.option_anchors_zero_fee_htlc_tx | Field | v24.08 | v25.08 | Renamed to `option_anchors` in the spec: check for that in `features` instead |
| experimental-anchors | Config | v24.02 | v25.02 | Now the default |


Inevitably there are features which need to change: either to be generalized, or removed when they can no longer be supported.
Expand Down
4 changes: 3 additions & 1 deletion lightningd/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,9 @@ static char *opt_set_quiesce(struct lightningd *ld)

static char *opt_set_anchor_zero_fee_htlc_tx(struct lightningd *ld)
{
/* FIXME: deprecated_apis! */
if (!opt_deprecated_ok(ld, "experimental-anchors", NULL,
"v24.02", "v25.02"))
return "--experimental-anchors is now enabled by default";
return NULL;
}

Expand Down
6 changes: 2 additions & 4 deletions tests/test_closing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,12 +1096,10 @@ def test_channel_lease_lessee_cheat(node_factory, bitcoind, chainparams):
opts = [{'funder-policy': 'match', 'funder-policy-mod': 100,
'lease-fee-base-sat': '100sat', 'lease-fee-basis': 100,
'may_reconnect': True, 'dev-no-reconnect': None,
'broken_log': 'Unknown spend of OUR_UNILATERAL/DELAYED_OUTPUT_TO_US',
'experimental-anchors': None},
'broken_log': 'Unknown spend of OUR_UNILATERAL/DELAYED_OUTPUT_TO_US'},
{'funder-policy': 'match', 'funder-policy-mod': 100,
'lease-fee-base-sat': '100sat', 'lease-fee-basis': 100,
'may_reconnect': True, 'dev-no-reconnect': None,
'experimental-anchors': None}]
'may_reconnect': True, 'dev-no-reconnect': None}]

l1, l2, = node_factory.get_nodes(2, opts=opts)
amount = 500000
Expand Down
11 changes: 4 additions & 7 deletions tests/test_opening.py
Original file line number Diff line number Diff line change
Expand Up @@ -2567,14 +2567,11 @@ def test_fundchannel_utxo_too_small(bitcoind, node_factory):
def test_opening_explicit_channel_type(node_factory, bitcoind):
plugin_path = Path(__file__).parent / "plugins" / "zeroconf-selective.py"
l1, l2, l3, l4 = node_factory.get_nodes(4,
opts=[{'experimental-dual-fund': None,
'experimental-anchors': None},
{'experimental-anchors': None,
'plugin': str(plugin_path),
opts=[{'experimental-dual-fund': None},
{'plugin': str(plugin_path),
'zeroconf-allow': '0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518'},
{'experimental-dual-fund': None,
'experimental-anchors': None},
{'experimental-anchors': None}])
{'experimental-dual-fund': None},
{}])

l1.fundwallet(FUNDAMOUNT)
l1.connect(l2)
Expand Down

0 comments on commit 991f6dc

Please sign in to comment.