X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fchain%2Fchainmonitor.rs;h=bbbd60d064be1cf8070f3ae633a76192e6ff3a39;hb=7cd60308866b0ee0bd238c5bd9738929341e6dbc;hp=06052dc84de52dd3d7257e55ec0aa4bed5ccc9e2;hpb=c1125f00b392432fc29fae8555183b46220bba26;p=rust-lightning diff --git a/lightning/src/chain/chainmonitor.rs b/lightning/src/chain/chainmonitor.rs index 06052dc8..bbbd60d0 100644 --- a/lightning/src/chain/chainmonitor.rs +++ b/lightning/src/chain/chainmonitor.rs @@ -35,7 +35,6 @@ use crate::ln::ChannelId; use crate::sign::ecdsa::WriteableEcdsaChannelSigner; use crate::events; use crate::events::{Event, EventHandler}; -use crate::util::atomic_counter::AtomicCounter; use crate::util::logger::{Logger, WithContext}; use crate::util::errors::APIError; use crate::util::wakers::{Future, Notifier}; @@ -149,7 +148,7 @@ pub trait Persist { /// The [`ChannelMonitorUpdate::update_id`] or [`ChannelMonitor::get_latest_update_id`] uniquely /// links this call to [`ChainMonitor::channel_monitor_updated`]. /// For [`Persist::update_persisted_channel`], it is only necessary to call [`ChainMonitor::channel_monitor_updated`] - /// when an [`ChannelMonitorUpdate`] is provided and when you return [`ChannelMonitorUpdateStatus::InProgress`]. + /// when a [`ChannelMonitorUpdate`] is provided and when you return [`ChannelMonitorUpdateStatus::InProgress`]. /// /// See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`, /// [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and @@ -221,10 +220,6 @@ pub struct ChainMonitor, { monitors: RwLock>>, - /// When we generate a monitor update for a chain-event monitor persistence, we need a - /// unique ID, which we calculate by simply getting the next value from this counter. Note that - /// the ID is never persisted so it's ok that they reset on restart. - sync_persistence_id: AtomicCounter, chain_source: Option, broadcaster: T, logger: L, @@ -315,7 +310,7 @@ where C::Target: chain::Filter, log_funding_info!(monitor) ), ChannelMonitorUpdateStatus::InProgress => { - log_debug!(logger, "Channel Monitor sync for channel {} in progress.", log_funding_info!(monitor)); + log_trace!(logger, "Channel Monitor sync for channel {} in progress.", log_funding_info!(monitor)); }, ChannelMonitorUpdateStatus::UnrecoverableError => { return Err(()); @@ -353,7 +348,6 @@ where C::Target: chain::Filter, pub fn new(chain_source: Option, broadcaster: T, logger: L, feeest: F, persister: P) -> Self { Self { monitors: RwLock::new(new_hash_map()), - sync_persistence_id: AtomicCounter::new(), chain_source, broadcaster, logger,