plugins: listpays will now consolidate multi-part payments.

This won't usually be visible to the end-user, since the pay plugin doesn't
do multi-part yet (and mpp requires EXPERIMENTAL_FEATURES), but we're ready
once it does.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-12-12 10:25:45 +10:30
committed by Christian Decker
parent f1bc0b21f1
commit 207689c274
2 changed files with 136 additions and 21 deletions

View File

@@ -2641,3 +2641,9 @@ def test_partial_payment(node_factory, bitcoind, executor):
assert "'forward_amount': '500msat'" in line
assert "'total_msat': '1000msat'" in line
assert "'payment_secret': '{}'".format(paysecret) in line
pay = only_one(l1.rpc.listpays()['pays'])
assert pay['bolt11'] == inv['bolt11']
assert pay['status'] == 'complete'
assert pay['number_of_parts'] == 2
assert pay['amount_sent_msat'] == Millisatoshi(1002)