From 8c23f22591cafc9abe3531ab316bc5c887d76975 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Mon, 27 Apr 2020 22:23:57 +0200 Subject: [PATCH] pytest: Reproduce issue #3666 It seems we aren't registering the featurebits correctly. --- tests/test_pay.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_pay.py b/tests/test_pay.py index 18b352f5d..866e99463 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -2961,6 +2961,7 @@ def test_excluded_adjacent_routehint(node_factory, bitcoind): l1.rpc.pay(bolt11=inv['bolt11'], maxfeepercent=0, exemptfee=0) +@pytest.mark.xfail(strict=True) def test_keysend(node_factory): # Use a temporary python plugin until we implement a native one plugin_path = os.path.join(os.getcwd(), 'tests/plugins/keysend.py') @@ -2968,6 +2969,11 @@ def test_keysend(node_factory): amt = 10000 l1, l2, l3 = node_factory.line_graph(3, opts=opts, wait_for_announce=True) + # The keysend featurebit must be set in the announcement, i.e., l1 should + # learn that l3 supports keysends. + features = l1.rpc.listnodes(l3.info['id'])['nodes'][0]['features'] + assert(int(features, 16) >> 55 & 0x01 == 1) + # Send an indirect one from l1 to l3 l1.rpc.keysend(l3.info['id'], amt) invs = l3.rpc.listinvoices()['invoices']