You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnErr(APIError::ChannelUnavailable{err:"Cannot begin shutdown while peer is disconnected or we're waiting on a monitor update, maybe force-close instead?".to_owned()});
let node_cfgs = create_node_cfgs(3,&chanmon_cfgs);
762
+
let node_chanmgrs = create_node_chanmgrs(3,&node_cfgs,&user_cfgs);
763
+
let nodes = create_network(3,&node_cfgs,&node_chanmgrs);
764
+
765
+
// Segwit v0 script of the form OP_0 <20-byte hash>
766
+
let script = Builder::new().push_int(0)
767
+
.push_slice(&[0;20])
768
+
.into_script();
769
+
770
+
let shutdown_script = ShutdownScript::try_from(script).unwrap();
771
+
772
+
let chan = create_announced_chan_between_nodes(&nodes,0,1);
773
+
let result = nodes[1].node.close_channel_with_feerate_and_script(&OutPoint{txid: chan.3.txid(),index:0}.to_channel_id(),&nodes[0].node.get_our_node_id(),None,Some(shutdown_script));
774
+
775
+
assert_eq!(result,Err(APIError::APIMisuseError{ err:"Cannot override shutdown script for a channel with one already set".to_string()}));
0 commit comments