Skip to content

Commit 773c0bb

Browse files
committed
tests: Add explicit preapprove{invoice,keysend} calls before sendpay
1 parent 07acd0c commit 773c0bb

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
@@ -3761,6 +3761,7 @@ def test_closing_anchorspend_htlc_tx_rbf(node_factory, bitcoind):
37613761
'delay': 12,
37623762
'channel': first_scid(l1, l2)
37633763
}
3764+
l1.rpc.preapprovekeysend(routestep['id'], rhash, routestep['amount_msat'])
37643765
l1.rpc.sendpay([routestep], rhash, payment_secret=inv['payment_secret'])
37653766
l2.daemon.wait_for_log('dev_disconnect')
37663767
l2.stop()
@@ -3828,6 +3829,7 @@ def test_htlc_no_force_close(node_factory, bitcoind, anchors):
38283829
'id': l3.info['id'],
38293830
'delay': 10,
38303831
'channel': first_scid(l2, l3)}]
3832+
l1.rpc.preapproveinvoice(bolt11=inv['bolt11']) # let the signer know this payment is coming
38313833
l1.rpc.sendpay(route, inv['payment_hash'],
38323834
payment_secret=inv['payment_secret'])
38333835
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
@@ -73,6 +73,8 @@ def test_mpp(node_factory):
7373

7474
send_amount = Millisatoshi('1200000sat')
7575
inv = l6.rpc.invoice(send_amount, 'test_renepay', 'description')['bolt11']
76+
# FIXME - This shouldn't be necessary, renepay should automatically generate ... vls-hsmd:#6
77+
l1.rpc.preapproveinvoice(bolt11=inv) # let the signer know this payment is coming
7678
details = l1.rpc.call('renepay', {'invstring': inv})
7779
assert details['status'] == 'complete'
7880
assert details['amount_msat'] == send_amount

0 commit comments

Comments
 (0)