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

Function test_splice_unannounced

tests/test_splicing.py:563–586  ·  view source on GitHub ↗
(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

561@pytest.mark.openchannel('v1')
562@pytest.mark.openchannel('v2')
563def test_splice_unannounced(node_factory, bitcoind):
564 l1, l2 = node_factory.line_graph(2, fundamount=1000000, wait_for_announce=False)
565
566 chan_id = l1.get_channel_id(l2)
567
568 # add extra sats to pay fee
569 funds_result = l1.rpc.fundpsbt("111722sat", 0, 0, excess_as_change=True)
570 result = l1.rpc.splice_init(chan_id, 100000, funds_result['psbt'])
571 result = l1.rpc.splice_update(chan_id, result['psbt'])
572 assert(result['commitments_secured'] is False)
573 result = l1.rpc.splice_update(chan_id, result['psbt'])
574 assert(result['commitments_secured'] is True)
575 result = l1.rpc.signpsbt(result['psbt'])
576 result = l1.rpc.splice_signed(chan_id, result['signed_psbt'])
577
578 l2.daemon.wait_for_log(r'CHANNELD_NORMAL to CHANNELD_AWAITING_SPLICE')
579 l1.daemon.wait_for_log(r'CHANNELD_NORMAL to CHANNELD_AWAITING_SPLICE')
580
581 bitcoind.generate_block(1, wait_for_mempool=1)
582
583 l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
584 l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
585 bitcoind.generate_block(1)
586 sync_blockheight(bitcoind, [l1, l2])

Callers

nothing calls this directly

Calls 10

sync_blockheightFunction · 0.90
line_graphMethod · 0.80
get_channel_idMethod · 0.80
fundpsbtMethod · 0.80
signpsbtMethod · 0.80
wait_for_logMethod · 0.80
generate_blockMethod · 0.80
splice_initMethod · 0.45
splice_updateMethod · 0.45
splice_signedMethod · 0.45

Tested by

no test coverage detected