- if persist_res.is_err() {
- log_error!(self.logger, "Failed to persist new ChannelMonitor for channel {}: {:?}", log_funding_info!(monitor), persist_res);
- } else {
- log_trace!(self.logger, "Finished persisting new ChannelMonitor for channel {}", log_funding_info!(monitor));
- }
- if persist_res == Err(ChannelMonitorUpdateErr::PermanentFailure) {
- return persist_res;
- } else if persist_res.is_err() {
- pending_monitor_updates.push(update_id);
+ match persist_res {
+ ChannelMonitorUpdateStatus::InProgress => {
+ log_info!(self.logger, "Persistence of new ChannelMonitor for channel {} in progress", log_funding_info!(monitor));
+ pending_monitor_updates.push(update_id);
+ },
+ ChannelMonitorUpdateStatus::PermanentFailure => {
+ log_error!(self.logger, "Persistence of new ChannelMonitor for channel {} failed", log_funding_info!(monitor));
+ return persist_res;
+ },
+ ChannelMonitorUpdateStatus::Completed => {
+ log_info!(self.logger, "Persistence of new ChannelMonitor for channel {} completed", log_funding_info!(monitor));
+ }