X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchannelmonitor.rs;fp=lightning%2Fsrc%2Fln%2Fchannelmonitor.rs;h=41c7eb89a069df737ce30006371df6c7c9838439;hb=4833d1acf9fd7755db5aaaaa50f3e54e8446d6b3;hp=dada0bcb45d43905bb19a0c4657b18a3cc0aa74a;hpb=9a0211543762ae15ce4a0b7cb5aa3cf295a4b61f;p=rust-lightning diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index dada0bcb..41c7eb89 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -152,7 +152,6 @@ pub struct SimpleManyChannelMonitor { } impl<'a, Key : Send + cmp::Eq + hash::Hash> ChainListener for SimpleManyChannelMonitor { - fn block_connected(&self, header: &BlockHeader, height: u32, txn_matched: &[&Transaction], _indexes_of_txn_matched: &[u32]) { let block_hash = header.bitcoin_hash(); let mut new_events: Vec = Vec::with_capacity(0); @@ -219,8 +218,8 @@ impl<'a, Key : Send + cmp::Eq + hash::Hash> ChainListener for SimpleManyChannelM impl SimpleManyChannelMonitor { /// Creates a new object which can be used to monitor several channels given the chain /// interface with which to register to receive notifications. - pub fn new(chain_monitor: Arc, broadcaster: Arc, logger: Arc, feeest: Arc) -> Arc> { - let res = Arc::new(SimpleManyChannelMonitor { + pub fn new(chain_monitor: Arc, broadcaster: Arc, logger: Arc, feeest: Arc) -> SimpleManyChannelMonitor { + let res = SimpleManyChannelMonitor { monitors: Mutex::new(HashMap::new()), chain_monitor, broadcaster, @@ -228,7 +227,7 @@ impl SimpleManyChannelMonitor pending_htlc_updated: Mutex::new(HashMap::new()), logger, fee_estimator: feeest, - }); + }; res }