Skip to content

Commit 0378730

Browse files
committed
f condense match arms
1 parent 4b27a10 commit 0378730

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -587,20 +587,16 @@ where C::Target: chain::Filter,
587587
match persist_res {
588588
ChannelMonitorUpdateResult::UpdateInProgress => {
589589
log_info!(self.logger, "Persistence of new ChannelMonitor for channel {} in progress", log_funding_info!(monitor));
590+
pending_monitor_updates.push(update_id);
590591
},
591592
ChannelMonitorUpdateResult::PermanentFailure => {
592593
log_error!(self.logger, "Persist of new ChannelMonitor for channel {} failed", log_funding_info!(monitor));
594+
return persist_res;
593595
},
594596
ChannelMonitorUpdateResult::UpdateComplete => {
595597
log_info!(self.logger, "Finished persisting new ChannelMonitor for channel {}", log_funding_info!(monitor));
596598
}
597599
}
598-
if persist_res == ChannelMonitorUpdateResult::PermanentFailure {
599-
return persist_res;
600-
}
601-
if persist_res== ChannelMonitorUpdateResult::UpdateInProgress {
602-
pending_monitor_updates.push(update_id);
603-
}
604600
if let Some(ref chain_source) = self.chain_source {
605601
monitor.load_outputs_to_watch(chain_source);
606602
}

0 commit comments

Comments
 (0)