From: Valentine Wallace Date: Wed, 17 Feb 2021 19:06:18 +0000 (-0500) Subject: log error on persisting new channel X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=9ab4e5e952e1a4071130917cd4f962fc9e620dc9;p=rust-lightning log error on persisting new channel --- diff --git a/lightning-persister/src/lib.rs b/lightning-persister/src/lib.rs index 588992449..9162d8215 100644 --- a/lightning-persister/src/lib.rs +++ b/lightning-persister/src/lib.rs @@ -143,13 +143,21 @@ impl channelmonitor::Persist fn persist_new_channel(&self, funding_txo: OutPoint, monitor: &ChannelMonitor) -> Result<(), ChannelMonitorUpdateErr> { 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) + // .map_err(|_| ChannelMonitorUpdateErr::PermanentFailure) + .map_err(|e| { + println!("VMW: failure in persist_new_channel: {:?}", e); + ChannelMonitorUpdateErr::PermanentFailure + }) } fn update_persisted_channel(&self, funding_txo: OutPoint, _update: &ChannelMonitorUpdate, monitor: &ChannelMonitor) -> Result<(), ChannelMonitorUpdateErr> { 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) + // .map_err(|_| ChannelMonitorUpdateErr::PermanentFailure) + .map_err(|e| { + println!("VMW: failure in update_persisted_channel: {:?}", e); + ChannelMonitorUpdateErr::PermanentFailure + }) } }