Skip to content

Commit

Permalink
pytest: Reproduce issue ElementsProject#3666
Browse files Browse the repository at this point in the history
It seems we aren't registering the featurebits correctly.
  • Loading branch information
cdecker committed Apr 27, 2020
1 parent 10f47b4 commit 36d522d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_pay.py
Original file line number Diff line number Diff line change
Expand Up @@ -2961,13 +2961,19 @@ 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')
opts = {'plugin': plugin_path}
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']
Expand Down

0 comments on commit 36d522d

Please sign in to comment.