From 4d5de1fe611ee16026a831d4f24a3801f75b59d6 Mon Sep 17 00:00:00 2001 From: Gursharan Singh <3442979+G8XSU@users.noreply.github.com> Date: Thu, 11 Apr 2024 23:35:54 -0700 Subject: [PATCH] Remove ChainMonitor::sync_persistence_id It was used earlier for generating unique MonitorUpdateId for UpdateOrigin::ChainSync monitor updates. --- lightning/src/chain/chainmonitor.rs | 6 ------ 1 file changed, 6 deletions(-) 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, -- 2.39.5