Skip to content

Commit 8c23f22

Browse files
cdeckerniftynei
authored andcommitted
pytest: Reproduce issue #3666
It seems we aren't registering the featurebits correctly.
1 parent 6e5aa1a commit 8c23f22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_pay.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2961,13 +2961,19 @@ def test_excluded_adjacent_routehint(node_factory, bitcoind):
29612961
l1.rpc.pay(bolt11=inv['bolt11'], maxfeepercent=0, exemptfee=0)
29622962

29632963

2964+
@pytest.mark.xfail(strict=True)
29642965
def test_keysend(node_factory):
29652966
# Use a temporary python plugin until we implement a native one
29662967
plugin_path = os.path.join(os.getcwd(), 'tests/plugins/keysend.py')
29672968
opts = {'plugin': plugin_path}
29682969
amt = 10000
29692970
l1, l2, l3 = node_factory.line_graph(3, opts=opts, wait_for_announce=True)
29702971

2972+
# The keysend featurebit must be set in the announcement, i.e., l1 should
2973+
# learn that l3 supports keysends.
2974+
features = l1.rpc.listnodes(l3.info['id'])['nodes'][0]['features']
2975+
assert(int(features, 16) >> 55 & 0x01 == 1)
2976+
29712977
# Send an indirect one from l1 to l3
29722978
l1.rpc.keysend(l3.info['id'], amt)
29732979
invs = l3.rpc.listinvoices()['invoices']

0 commit comments

Comments
 (0)