Skip to content

Commit 874aac8

Browse files
committed
tests: Add explicit preapprove{invoice,keysend} calls before sendpay
1 parent 5897fb3 commit 874aac8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/test_closing.py

+2
Original file line numberDiff line numberDiff line change
@@ -3773,6 +3773,7 @@ def test_closing_anchorspend_htlc_tx_rbf(node_factory, bitcoind):
37733773
'delay': 12,
37743774
'channel': first_scid(l1, l2)
37753775
}
3776+
l1.rpc.preapprovekeysend(routestep['id'], rhash, routestep['amount_msat'])
37763777
l1.rpc.sendpay([routestep], rhash, payment_secret=inv['payment_secret'])
37773778
l2.daemon.wait_for_log('dev_disconnect')
37783779
l2.stop()
@@ -3841,6 +3842,7 @@ def test_htlc_no_force_close(node_factory, bitcoind, anchors):
38413842
'id': l3.info['id'],
38423843
'delay': 10,
38433844
'channel': first_scid(l2, l3)}]
3845+
l1.rpc.preapproveinvoice(bolt11=inv['bolt11']) # let the signer know this payment is coming
38443846
l1.rpc.sendpay(route, inv['payment_hash'],
38453847
payment_secret=inv['payment_secret'])
38463848
l3.daemon.wait_for_log('dev_disconnect')

tests/test_renepay.py

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def test_mpp(node_factory):
3636

3737
send_amount = Millisatoshi('1200000sat')
3838
inv = l6.rpc.invoice(send_amount, 'test_renepay', 'description')['bolt11']
39+
# FIXME - This shouldn't be necessary, renepay should automatically generate ... vls-hsmd:#6
40+
l1.rpc.preapproveinvoice(bolt11=inv) # let the signer know this payment is coming
3941
details = l1.rpc.call('renepay', {'invstring': inv})
4042
assert details['status'] == 'complete'
4143
assert details['amount_msat'] == send_amount

0 commit comments

Comments
 (0)