Skip to content

Commit 56763e4

Browse files
committed
tests: Add explicit preapprove{invoice,keysend} calls before sendpay
1 parent b1997e0 commit 56763e4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/test_closing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3779,6 +3779,7 @@ def test_closing_anchorspend_htlc_tx_rbf(node_factory, bitcoind):
37793779
'delay': 12,
37803780
'channel': first_scid(l1, l2)
37813781
}
3782+
l1.rpc.preapprovekeysend(routestep['id'], rhash, routestep['amount_msat'])
37823783
l1.rpc.sendpay([routestep], rhash, payment_secret=inv['payment_secret'])
37833784
l2.daemon.wait_for_log('dev_disconnect')
37843785
l2.stop()
@@ -3847,6 +3848,7 @@ def test_htlc_no_force_close(node_factory, bitcoind, anchors):
38473848
'id': l3.info['id'],
38483849
'delay': 10,
38493850
'channel': first_scid(l2, l3)}]
3851+
l1.rpc.preapproveinvoice(bolt11=inv['bolt11']) # let the signer know this payment is coming
38503852
l1.rpc.sendpay(route, inv['payment_hash'],
38513853
payment_secret=inv['payment_secret'])
38523854
l3.daemon.wait_for_log('dev_disconnect')

tests/test_renepay.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def test_mpp(node_factory):
3737

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

0 commit comments

Comments
 (0)