diff --git a/doc/schemas/listpeerchannels.schema.json b/doc/schemas/listpeerchannels.schema.json index 3d994c08cb8b..7f3a5779fe99 100644 --- a/doc/schemas/listpeerchannels.schema.json +++ b/doc/schemas/listpeerchannels.schema.json @@ -378,7 +378,8 @@ "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", - "DUALOPEND_AWAITING_LOCKIN" + "DUALOPEND_AWAITING_LOCKIN", + "CHANNELD_AWAITING_SPLICE" ], "description": "Previous state" }, @@ -395,7 +396,8 @@ "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", - "DUALOPEND_AWAITING_LOCKIN" + "DUALOPEND_AWAITING_LOCKIN", + "CHANNELD_AWAITING_SPLICE" ], "description": "New state" }, diff --git a/tests/test_splicing.py b/tests/test_splicing.py index 614c0f52257f..322eadb1e30e 100644 --- a/tests/test_splicing.py +++ b/tests/test_splicing.py @@ -9,8 +9,13 @@ def test_splice(node_factory, bitcoind): l1, l2 = node_factory.line_graph(2, fundamount=1000000, wait_for_announce=True) + # get channel id chan_id = l1.get_channel_id(l2) + + channels = l1.rpc.listpeerchannels()['channels'] + original_scid = channels[0].get('short_channel_id') + # add extra sats to pay fee funds_result = l1.rpc.fundpsbt("109000sat", "slow", 166, excess_as_change=True) @@ -26,10 +31,20 @@ def test_splice(node_factory, bitcoind): assert len(list(mempool.keys())) == 1 assert result['txid'] in list(mempool.keys()) - bitcoind.generate_block(6, wait_for_mempool=1) + bitcoind.generate_block(9, wait_for_mempool=1) l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL') l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL') inv = l2.rpc.invoice(10**2, '3', 'no_3') l1.rpc.pay(inv['bolt11']) + + peer_channels = l1.rpc.listpeerchannels()['channels'] + assert len(peer_channels) > 0 + + new_scid = peer_channels[0].get('short_channel_id') + + assert new_scid != original_scid + all_channels = l1.rpc.listchannels()['channels'] + print("ALL CHANNELS: {}".format(all_channels)) + assert len(all_channels) > 0 \ No newline at end of file