Access signed local commitment through OnchainTxHandler
[rust-lightning] / lightning / src / ln / functional_test_utils.rs
index 95358208e9de283f2b78837e74cd78875d773a8e..a2f9a7c3239981fb735643d5998672f6b348b28f 100644 (file)
@@ -264,7 +264,7 @@ macro_rules! get_local_commitment_txn {
                        let mut commitment_txn = None;
                        for (funding_txo, monitor) in monitors.iter_mut() {
                                if funding_txo.to_channel_id() == $channel_id {
-                                       commitment_txn = Some(monitor.get_latest_local_commitment_txn());
+                                       commitment_txn = Some(monitor.unsafe_get_latest_local_commitment_txn());
                                        break;
                                }
                        }
@@ -1038,7 +1038,7 @@ pub fn fail_payment<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_route:
 pub fn create_chanmon_cfgs(node_count: usize) -> Vec<TestChanMonCfg> {
        let mut chan_mon_cfgs = Vec::new();
        for _ in 0..node_count {
-               let tx_broadcaster = test_utils::TestBroadcaster{txn_broadcasted: Mutex::new(Vec::new())};
+               let tx_broadcaster = test_utils::TestBroadcaster{txn_broadcasted: Mutex::new(Vec::new()), broadcasted_txn: Mutex::new(HashMap::new())};
                let fee_estimator = test_utils::TestFeeEstimator { sat_per_kw: 253 };
                chan_mon_cfgs.push(TestChanMonCfg{ tx_broadcaster, fee_estimator });
        }