Allowing user-specified error message during force close channel
[rust-lightning] / lightning / src / ln / priv_short_conf_tests.rs
index 6fd8623d317376b5b6d156869c2a5949bca7e33d..c9b0b7d4d7966aa83f1f6e827a9c827c0e88f1af 100644 (file)
@@ -753,6 +753,7 @@ fn test_0conf_close_no_early_chan_update() {
 
        let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, Some(chan_config)]);
        let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
+       let error_message = "Channel force-closed";
 
        // This is the default but we force it on anyway
        chan_config.channel_handshake_config.announced_channel = true;
@@ -761,7 +762,7 @@ fn test_0conf_close_no_early_chan_update() {
        // We can use the channel immediately, but won't generate a channel_update until we get confs
        send_payment(&nodes[0], &[&nodes[1]], 100_000);
 
-       nodes[0].node.force_close_all_channels_broadcasting_latest_txn();
+       nodes[0].node.force_close_all_channels_broadcasting_latest_txn(error_message.to_string());
        check_added_monitors!(nodes[0], 1);
        check_closed_event!(&nodes[0], 1, ClosureReason::HolderForceClosed, [nodes[1].node.get_our_node_id()], 100000);
        let _ = get_err_msg(&nodes[0], &nodes[1].node.get_our_node_id());