Browse Source

pytest: test to show that listpays doesn't remember bolt11 string.

[Separated into separate commit by RR]
exclude-equal-hint
Vincent 5 years ago
committed by Christian Decker
parent
commit
f4f2853ded
  1. 24
      tests/test_pay.py

24
tests/test_pay.py

@ -3193,3 +3193,27 @@ def test_pay_fail_unconfirmed_channel(node_factory, bitcoind):
# Now l1 can pay to l2.
l1.rpc.pay(invl2)
@pytest.mark.xfail(strict=True)
def test_bolt11_null_after_pay(node_factory, bitcoind):
l1, l2 = node_factory.get_nodes(2)
amount_sat = 10 ** 6
# pay a generic bolt11 and test if the label bol11 is null
# inside the command listpays
# create l2->l1 channel.
l2.fundwallet(amount_sat * 5)
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l2.rpc.fundchannel(l1.info['id'], amount_sat * 3)
# Let the channel confirm.
bitcoind.generate_block(6)
sync_blockheight(bitcoind, [l1, l2])
invl1 = l1.rpc.invoice(Millisatoshi(amount_sat * 2 * 1000), 'j', 'j')['bolt11']
l2.rpc.pay(invl1)
pays = l2.rpc.listpays()["pays"]
assert pays[0]["bolt11"] == invl1

Loading…
Cancel
Save