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

Function test_splice_unannounced

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

Source from the content-addressed store, hash-verified

758@pytest.mark.openchannel('v1')
759@pytest.mark.openchannel('v2')
760def test_splice_unannounced(node_factory, bitcoind):
761 l1, l2 = node_factory.line_graph(2, fundamount=1000000, wait_for_announce=False)
762
763 chan_id = l1.get_channel_id(l2)
764
765 # add extra sats to pay fee
766 funds_result = l1.rpc.fundpsbt("111722sat", 0, 0, excess_as_change=True)
767 result = l1.rpc.splice_init(chan_id, 100000, funds_result['psbt'])
768 result = l1.rpc.splice_update(chan_id, result['psbt'])
769 assert(result['commitments_secured'] is False)
770 result = l1.rpc.splice_update(chan_id, result['psbt'])
771 assert(result['commitments_secured'] is True)
772 result = l1.rpc.signpsbt(result['psbt'])
773 result = l1.rpc.splice_signed(chan_id, result['signed_psbt'])
774
775 l2.daemon.wait_for_log(r'CHANNELD_NORMAL to CHANNELD_AWAITING_SPLICE')
776 l1.daemon.wait_for_log(r'CHANNELD_NORMAL to CHANNELD_AWAITING_SPLICE')
777
778 bitcoind.generate_block(1, wait_for_mempool=1)
779
780 l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
781 l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
782 bitcoind.generate_block(1)
783 sync_blockheight(bitcoind, [l1, l2])
784
785
786@pytest.mark.openchannel('v1')

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