]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Merge pull request #2889 from Sharmalm/2840
authorArik <arik-so@users.noreply.github.com>
Mon, 3 Jun 2024 21:48:52 +0000 (14:48 -0700)
committerGitHub <noreply@github.com>
Mon, 3 Jun 2024 21:48:52 +0000 (14:48 -0700)
Allow for user-specified error message during force close channel

15 files changed:
1  2 
fuzz/src/full_stack.rs
lightning-background-processor/src/lib.rs
lightning-persister/src/fs_store.rs
lightning/src/ln/async_signer_tests.rs
lightning/src/ln/blinded_payment_tests.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/monitor_tests.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/priv_short_conf_tests.rs
lightning/src/ln/reload_tests.rs
lightning/src/ln/reorg_tests.rs
lightning/src/ln/shutdown_tests.rs
lightning/src/util/persist.rs

Simple merge
index 8a144f6196b814104665572366f17c2b7ba02d72,88a464e2d4181a60512a35d4b52385ea5a9a4faa..093ab1ece07a619c3ba82386d253bb7fa41e4ac7
@@@ -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
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge