Skip to content

Commit 625107b

Browse files
committed
tests: Add explicit preapprove{invoice,keysend} calls before sendpay
1 parent e524ac5 commit 625107b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tests/test_closing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3951,6 +3951,7 @@ def test_peer_anchor_push(node_factory, bitcoind, executor, chainparams):
39513951
amt = 100_000_000
39523952
sticky_inv = l3.rpc.invoice(amt, 'sticky', 'sticky')
39533953
route = l1.rpc.getroute(l3.info['id'], amt, 1)['route']
3954+
l1.rpc.preapproveinvoice(bolt11=sticky_inv['bolt11']) # let the signer know this payment is coming
39543955
l1.rpc.sendpay(route, sticky_inv['payment_hash'], payment_secret=sticky_inv['payment_secret'])
39553956
l3.daemon.wait_for_log('dev_disconnect: -WIRE_UPDATE_FULFILL_HTLC')
39563957

tests/test_pay.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ def test_repay(node_factory):
711711
'delay': 5,
712712
'channel': first_scid(l1, l2)
713713
}
714+
l1.rpc.preapproveinvoice(bolt11=inv['bolt11']) # let the signer know this payment is coming
714715
l1.rpc.sendpay([routestep], inv['payment_hash'], payment_secret=inv['payment_secret'])
715716
l1.daemon.wait_for_log("Sending 200000000msat over 1 hops to deliver 200000000msat")
716717
l1.rpc.waitsendpay(inv['payment_hash'])['payment_preimage']
@@ -739,6 +740,7 @@ def test_wait_sendpay(node_factory, executor):
739740
'delay': 5,
740741
'channel': first_scid(l1, l2)
741742
}
743+
l1.rpc.preapproveinvoice(bolt11=inv['bolt11']) # let the signer know this payment is coming
742744
l1.rpc.sendpay([routestep], inv['payment_hash'], payment_secret=inv['payment_secret'])
743745
assert wait_created.result(TIMEOUT) == {'subsystem': 'sendpays',
744746
'created': 1,

0 commit comments

Comments
 (0)