Skip to content

Commit ca41414

Browse files
rustyrussellvincenzopalazzo
authored andcommitted
offers: make it the default.
Changelog-Changed: offers: bolt12 now enabled by default (finally!) Signed-off-by: Rusty Russell <[email protected]>
1 parent 05fbcb4 commit ca41414

File tree

3 files changed

+2
-25
lines changed

3 files changed

+2
-25
lines changed

lightningd/lightningd.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ struct config {
7575
/* How long before we give up waiting for INIT msg */
7676
u32 connection_timeout_secs;
7777

78-
/* EXPERIMENTAL: offers support */
79-
bool exp_offers;
80-
8178
/* Allow dust reserves (including 0) when being called via
8279
* `fundchannel` or in the `openchannel` hook. This is a
8380
* slight spec incompatibility, but implementations do this

lightningd/options.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,8 +1030,6 @@ static const struct config testnet_config = {
10301030
/* 1 minute should be enough for anyone! */
10311031
.connection_timeout_secs = 60,
10321032

1033-
.exp_offers = false,
1034-
10351033
.allowdustreserve = false,
10361034

10371035
.require_confirmed_inputs = false,
@@ -1110,8 +1108,6 @@ static const struct config mainnet_config = {
11101108
/* 1 minute should be enough for anyone! */
11111109
.connection_timeout_secs = 60,
11121110

1113-
.exp_offers = false,
1114-
11151111
.allowdustreserve = false,
11161112

11171113
.require_confirmed_inputs = false,
@@ -1316,7 +1312,7 @@ static char *opt_set_anchor_zero_fee_htlc_tx(struct lightningd *ld)
13161312

13171313
static char *opt_set_offers(struct lightningd *ld)
13181314
{
1319-
ld->config.exp_offers = true;
1315+
/* FIXME: Deprecate */
13201316
return NULL;
13211317
}
13221318

@@ -2066,7 +2062,7 @@ void add_config_deprecated(struct lightningd *ld,
20662062
->bits[INIT_FEATURE],
20672063
OPT_ONION_MESSAGES));
20682064
} else if (opt->cb == (void *)opt_set_offers) {
2069-
json_add_bool(response, name0, ld->config.exp_offers);
2065+
json_add_bool(response, name0, true);
20702066
} else if (opt->cb == (void *)opt_set_shutdown_wrong_funding) {
20712067
json_add_bool(response, name0,
20722068
feature_offered(ld->our_features

tests/test_pay.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4225,22 +4225,6 @@ def test_mpp_overload_payee(node_factory, bitcoind):
42254225
l1.rpc.pay(inv)
42264226

42274227

4228-
@unittest.skipIf(TEST_NETWORK != 'regtest', "Canned offer is network specific")
4229-
def test_offer_needs_option(node_factory):
4230-
"""Make sure we don't make offers without offer command"""
4231-
l1 = node_factory.get_node()
4232-
with pytest.raises(RpcError, match='experimental-offers not enabled'):
4233-
l1.rpc.call('offer', {'amount': '1msat', 'description': 'test'})
4234-
with pytest.raises(RpcError, match='experimental-offers not enabled'):
4235-
l1.rpc.call('invoicerequest', {'amount': '2msat',
4236-
'description': 'simple test'})
4237-
with pytest.raises(RpcError, match='experimental-offers not enabled'):
4238-
l1.rpc.call('fetchinvoice', {'offer': 'lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqyqs5pr5v4ehg93pqfnwgkvdr57yzh6h92zg3qctvrm7w38djg67kzcm4yeg8vc4cq63s'})
4239-
4240-
# Decode still works though
4241-
assert l1.rpc.decode('lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqyqs5pr5v4ehg93pqfnwgkvdr57yzh6h92zg3qctvrm7w38djg67kzcm4yeg8vc4cq63s')['valid']
4242-
4243-
42444228
def test_offer(node_factory, bitcoind):
42454229
plugin = os.path.join(os.path.dirname(__file__), 'plugins/currencyUSDAUD5000.py')
42464230
l1 = node_factory.get_node(options={'plugin': plugin, 'experimental-offers': None})

0 commit comments

Comments
 (0)