From: Gursharan Singh <3442979+G8XSU@users.noreply.github.com> Date: Fri, 12 Apr 2024 06:35:54 +0000 (-0700) Subject: Remove ChainMonitor::sync_persistence_id X-Git-Tag: v0.0.124-beta~133^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=4d5de1fe611ee16026a831d4f24a3801f75b59d6;p=rust-lightning Remove ChainMonitor::sync_persistence_id It was used earlier for generating unique MonitorUpdateId for UpdateOrigin::ChainSync monitor updates. --- diff --git a/lightning/src/chain/chainmonitor.rs b/lightning/src/chain/chainmonitor.rs index 06052dc84..c68e9a716 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}; @@ -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, @@ -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,