MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_htlc_retransmit_order

Function test_htlc_retransmit_order

tests/test_connection.py:3761–3792  ·  view source on GitHub ↗
(node_factory, executor)

Source from the content-addressed store, hash-verified

3759
3760
3761def test_htlc_retransmit_order(node_factory, executor):
3762 NUM_HTLCS = 10
3763 l1, l2 = node_factory.line_graph(2,
3764 opts=[{'may_reconnect': True,
3765 'feerates': (7500, 7500, 7500, 7500),
3766 'disconnect': ['=WIRE_UPDATE_ADD_HTLC*' + str(NUM_HTLCS),
3767 '-WIRE_COMMITMENT_SIGNED'],
3768 'dev-disable-commit-after': 0},
3769 {'may_reconnect': True}])
3770 invoices = [l2.rpc.invoice(1000, str(x), str(x)) for x in range(NUM_HTLCS)]
3771
3772 routestep = {
3773 'amount_msat': 1000,
3774 'id': l2.info['id'],
3775 'delay': 5,
3776 'channel': first_scid(l1, l2)
3777 }
3778 for inv in invoices:
3779 executor.submit(l1.rpc.sendpay, [routestep], inv['payment_hash'], payment_secret=inv['payment_secret'])
3780
3781 l1.daemon.wait_for_log('dev_disconnect')
3782 l1.rpc.call('dev-reenable-commit', [l2.info['id']])
3783 l1.daemon.wait_for_log('dev_disconnect')
3784
3785 # Now reconnect.
3786 l1.rpc.connect(l2.info['id'], 'localhost', port=l2.port)
3787
3788 for inv in invoices:
3789 result = l1.rpc.waitsendpay(inv['payment_hash'])
3790 assert(result['status'] == 'complete')
3791
3792 # If order was wrong, we'll get a LOG_BROKEN and fixtures will complain.
3793
3794
3795@unittest.skipIf(True, "Currently failing, see tracking issue #4265")

Callers

nothing calls this directly

Calls 7

first_scidFunction · 0.90
line_graphMethod · 0.80
wait_for_logMethod · 0.80
waitsendpayMethod · 0.80
invoiceMethod · 0.45
callMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected