]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Merge pull request #461 from ariard/2020-remove-duplicata
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Wed, 12 Feb 2020 17:38:21 +0000 (17:38 +0000)
committerGitHub <noreply@github.com>
Wed, 12 Feb 2020 17:38:21 +0000 (17:38 +0000)
Remove some duplicata of broadcast txn from ChannelMonitor

1  2 
lightning/src/ln/channelmonitor.rs
lightning/src/ln/functional_tests.rs
lightning/src/util/test_utils.rs

Simple merge
index 5c16e72748198917d93ae7bd956106f94df641f3,e9153fb63ae5f30477a4323b626130a2bb8704d9..9b1907cbb776e4b048482ba21328947b4f68b497
@@@ -6371,9 -6316,9 +6377,9 @@@ fn test_data_loss_protect() 
  
        // Restore node A from previous state
        let logger: Arc<Logger> = Arc::new(test_utils::TestLogger::with_id(format!("node {}", 0)));
 -      let mut chan_monitor = <(Sha256dHash, ChannelMonitor)>::read(&mut ::std::io::Cursor::new(previous_chan_monitor_state.0), Arc::clone(&logger)).unwrap().1;
 +      let mut chan_monitor = <(Sha256dHash, ChannelMonitor<EnforcingChannelKeys>)>::read(&mut ::std::io::Cursor::new(previous_chan_monitor_state.0), Arc::clone(&logger)).unwrap().1;
        let chain_monitor = Arc::new(ChainWatchInterfaceUtil::new(Network::Testnet, Arc::clone(&logger)));
-       let tx_broadcaster = Arc::new(test_utils::TestBroadcaster{txn_broadcasted: Mutex::new(Vec::new())});
+       let tx_broadcaster = Arc::new(test_utils::TestBroadcaster{txn_broadcasted: Mutex::new(Vec::new()), broadcasted_txn: Mutex::new(HashSet::new())});
        let feeest = Arc::new(test_utils::TestFeeEstimator { sat_per_kw: 253 });
        monitor = test_utils::TestChannelMonitor::new(chain_monitor.clone(), tx_broadcaster.clone(), logger.clone(), feeest.clone());
        node_state_0 = {
Simple merge