]> git.bitcoin.ninja Git - rust-lightning/commitdiff
log error on persisting new channel
authorValentine Wallace <vwallace@protonmail.com>
Wed, 17 Feb 2021 19:06:18 +0000 (14:06 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Wed, 17 Feb 2021 19:06:18 +0000 (14:06 -0500)
lightning-persister/src/lib.rs

index 5889924491dac892011e4a157b9e78da10c43da8..9162d8215f68cf423979faa5a754baf03c81efc5 100644 (file)
@@ -143,13 +143,21 @@ impl<ChanSigner: ChannelKeys + Send + Sync> channelmonitor::Persist<ChanSigner>
        fn persist_new_channel(&self, funding_txo: OutPoint, monitor: &ChannelMonitor<ChanSigner>) -> 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<ChanSigner>) -> 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
+                       })
        }
 }