mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 23:04:35 +01:00
sendinvoice: call waitinvoice directly to on invoice payment.
Suggested-by: Christian Decker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -4003,6 +4003,18 @@ def test_sendinvoice(node_factory, bitcoind):
|
||||
out = l2.rpc.call('sendinvoice', {'offer': offer,
|
||||
'label': 'test sendinvoice 1'})
|
||||
print(out)
|
||||
assert out['label'] == 'test sendinvoice 1'
|
||||
assert out['description'] == 'simple test'
|
||||
assert 'bolt12' in out
|
||||
assert 'payment_hash' in out
|
||||
assert out['status'] == 'paid'
|
||||
assert 'payment_preimage' in out
|
||||
assert 'expires_at' in out
|
||||
assert out['msatoshi'] == 100000000
|
||||
assert out['amount_msat'] == Millisatoshi(100000000)
|
||||
assert 'pay_index' in out
|
||||
assert out['msatoshi_received'] == 100000000
|
||||
assert out['amount_received_msat'] == Millisatoshi(100000000)
|
||||
|
||||
# Note, if we're slow, this fails with "Offer no longer available",
|
||||
# *but* if it hasn't heard about payment success yet, l2 will fail
|
||||
|
||||
Reference in New Issue
Block a user