@@ -49,6 +49,30 @@ def test_splice(node_factory, bitcoind):
49
49
assert l1 .db_query ("SELECT count(*) as c FROM channeltxs;" )[0 ]['c' ] == 0
50
50
51
51
52
+ @pytest .mark .openchannel ('v1' )
53
+ @pytest .mark .openchannel ('v2' )
54
+ @unittest .skipIf (TEST_NETWORK != 'regtest' , 'elementsd doesnt yet support PSBT features we need' )
55
+ def test_splice_nosign (node_factory , bitcoind ):
56
+ l1 , l2 = node_factory .line_graph (2 , fundamount = 1000000 , wait_for_announce = True , opts = {'experimental-splicing' : None })
57
+
58
+ chan_id = l1 .get_channel_id (l2 )
59
+
60
+ # add extra sats to pay fee
61
+ funds_result = l1 .rpc .fundpsbt ("109000sat" , "slow" , 166 , excess_as_change = True )
62
+
63
+ result = l1 .rpc .splice_init (chan_id , 100000 , funds_result ['psbt' ])
64
+ result = l1 .rpc .splice_update (chan_id , result ['psbt' ])
65
+ assert (result ['commitments_secured' ] is False )
66
+ result = l1 .rpc .splice_update (chan_id , result ['psbt' ])
67
+ assert (result ['commitments_secured' ] is True )
68
+ try :
69
+ l1 .rpc .splice_signed (chan_id , result ['psbt' ])
70
+ assert (False )
71
+ except RpcError as e :
72
+ assert (e .error ['code' ] == 358 )
73
+ assert (e .error ['message' ] == "The PSBT is missing a signature. Have you signed it with `signpsbt`?" )
74
+
75
+
52
76
@pytest .mark .openchannel ('v1' )
53
77
@pytest .mark .openchannel ('v2' )
54
78
@unittest .skipIf (TEST_NETWORK != 'regtest' , 'elementsd doesnt yet support PSBT features we need' )
0 commit comments