From: Valentine Wallace Date: Wed, 17 Feb 2021 19:22:02 +0000 (-0500) Subject: check that all updates are being attempted to persist X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=986edee84713ea194b7ce3e74051e42a40a873cf;p=rust-lightning check that all updates are being attempted to persist --- 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)