From: Arik Date: Mon, 3 Jun 2024 21:48:52 +0000 (-0700) Subject: Merge pull request #2889 from Sharmalm/2840 X-Git-Tag: v0.0.124-beta~104 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=993cd1e5253d62abb3ef23a3e58de121139e8fce;p=rust-lightning Merge pull request #2889 from Sharmalm/2840 Allow for user-specified error message during force close channel --- 993cd1e5253d62abb3ef23a3e58de121139e8fce diff --cc lightning-persister/src/fs_store.rs index 8a144f619,88a464e2d..093ab1ece --- a/lightning-persister/src/fs_store.rs +++ b/lightning-persister/src/fs_store.rs @@@ -445,9 -445,12 +445,10 @@@ mod tests let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]); let nodes = create_network(2, &node_cfgs, &node_chanmgrs); let chan = create_announced_chan_between_nodes(&nodes, 0, 1); - nodes[1].node.force_close_broadcasting_latest_txn(&chan.2, &nodes[0].node.get_our_node_id()).unwrap(); + let error_message = "Channel force-closed"; + nodes[1].node.force_close_broadcasting_latest_txn(&chan.2, &nodes[0].node.get_our_node_id(), error_message.to_string()).unwrap(); check_closed_event!(nodes[1], 1, ClosureReason::HolderForceClosed, [nodes[0].node.get_our_node_id()], 100000); let mut added_monitors = nodes[1].chain_monitor.added_monitors.lock().unwrap(); - let update_map = nodes[1].chain_monitor.latest_monitor_update_id.lock().unwrap(); - let update_id = update_map.get(&added_monitors[0].1.channel_id()).unwrap(); // Set the store's directory to read-only, which should result in // returning an unrecoverable failure when we then attempt to persist a