diff --git a/lightningd/lightningd.h b/lightningd/lightningd.h index df7f83f6b..00199de56 100644 --- a/lightningd/lightningd.h +++ b/lightningd/lightningd.h @@ -75,9 +75,6 @@ struct config { /* How long before we give up waiting for INIT msg */ u32 connection_timeout_secs; - /* EXPERIMENTAL: offers support */ - bool exp_offers; - /* Allow dust reserves (including 0) when being called via * `fundchannel` or in the `openchannel` hook. This is a * slight spec incompatibility, but implementations do this diff --git a/lightningd/options.c b/lightningd/options.c index dbe275abd..d7c64a09a 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -1030,8 +1030,6 @@ static const struct config testnet_config = { /* 1 minute should be enough for anyone! */ .connection_timeout_secs = 60, - .exp_offers = false, - .allowdustreserve = false, .require_confirmed_inputs = false, @@ -1110,8 +1108,6 @@ static const struct config mainnet_config = { /* 1 minute should be enough for anyone! */ .connection_timeout_secs = 60, - .exp_offers = false, - .allowdustreserve = false, .require_confirmed_inputs = false, @@ -1316,7 +1312,7 @@ static char *opt_set_anchor_zero_fee_htlc_tx(struct lightningd *ld) static char *opt_set_offers(struct lightningd *ld) { - ld->config.exp_offers = true; + /* FIXME: Deprecate */ return NULL; } @@ -2066,7 +2062,7 @@ void add_config_deprecated(struct lightningd *ld, ->bits[INIT_FEATURE], OPT_ONION_MESSAGES)); } else if (opt->cb == (void *)opt_set_offers) { - json_add_bool(response, name0, ld->config.exp_offers); + json_add_bool(response, name0, true); } else if (opt->cb == (void *)opt_set_shutdown_wrong_funding) { json_add_bool(response, name0, feature_offered(ld->our_features diff --git a/tests/test_pay.py b/tests/test_pay.py index 1cc1997c7..5b30bc780 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -4225,22 +4225,6 @@ def test_mpp_overload_payee(node_factory, bitcoind): l1.rpc.pay(inv) -@unittest.skipIf(TEST_NETWORK != 'regtest', "Canned offer is network specific") -def test_offer_needs_option(node_factory): - """Make sure we don't make offers without offer command""" - l1 = node_factory.get_node() - with pytest.raises(RpcError, match='experimental-offers not enabled'): - l1.rpc.call('offer', {'amount': '1msat', 'description': 'test'}) - with pytest.raises(RpcError, match='experimental-offers not enabled'): - l1.rpc.call('invoicerequest', {'amount': '2msat', - 'description': 'simple test'}) - with pytest.raises(RpcError, match='experimental-offers not enabled'): - l1.rpc.call('fetchinvoice', {'offer': 'lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqyqs5pr5v4ehg93pqfnwgkvdr57yzh6h92zg3qctvrm7w38djg67kzcm4yeg8vc4cq63s'}) - - # Decode still works though - assert l1.rpc.decode('lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqyqs5pr5v4ehg93pqfnwgkvdr57yzh6h92zg3qctvrm7w38djg67kzcm4yeg8vc4cq63s')['valid'] - - def test_offer(node_factory, bitcoind): plugin = os.path.join(os.path.dirname(__file__), 'plugins/currencyUSDAUD5000.py') l1 = node_factory.get_node(options={'plugin': plugin, 'experimental-offers': None})