From 986edee84713ea194b7ce3e74051e42a40a873cf Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Wed, 17 Feb 2021 14:22:02 -0500 Subject: [PATCH] check that all updates are being attempted to persist --- lightning-persister/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightning-persister/src/lib.rs b/lightning-persister/src/lib.rs index 4ec0b48b2..0febc0cef 100644 --- a/lightning-persister/src/lib.rs +++ b/lightning-persister/src/lib.rs @@ -141,6 +141,7 @@ impl FilesystemPersister { impl channelmonitor::Persist for FilesystemPersister { fn persist_new_channel(&self, funding_txo: OutPoint, monitor: &ChannelMonitor) -> Result<(), ChannelMonitorUpdateErr> { + println!("VMW: persisting monitor w/ update ID: {}", monitor.get_latest_update_id()); let filename = format!("{}_{}", funding_txo.txid.to_hex(), funding_txo.index); util::write_to_file(self.path_to_channel_data.clone(), filename, monitor) // .map_err(|_| ChannelMonitorUpdateErr::PermanentFailure) @@ -151,6 +152,7 @@ impl channelmonitor::Persist } fn update_persisted_channel(&self, funding_txo: OutPoint, _update: &ChannelMonitorUpdate, monitor: &ChannelMonitor) -> Result<(), ChannelMonitorUpdateErr> { + println!("VMW: updating persisted monitor w/ update ID: {}", monitor.get_latest_update_id()); let filename = format!("{}_{}", funding_txo.txid.to_hex(), funding_txo.index); util::write_to_file(self.path_to_channel_data.clone(), filename, monitor) // .map_err(|_| ChannelMonitorUpdateErr::PermanentFailure) -- 2.39.5