Skip to content

Commit 882f1d8

Browse files
committed
f condense match arms
1 parent 1cee35a commit 882f1d8

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
@@ -599,20 +599,16 @@ where C::Target: chain::Filter,
599599
match persist_res {
600600
ChannelMonitorUpdateResult::UpdateInProgress => {
601601
log_info!(self.logger, "Persistence of new ChannelMonitor for channel {} in progress", log_funding_info!(monitor));
602+
pending_monitor_updates.push(update_id);
602603
},
603604
ChannelMonitorUpdateResult::PermanentFailure => {
604605
log_error!(self.logger, "Persist of new ChannelMonitor for channel {} failed", log_funding_info!(monitor));
606+
return persist_res;
605607
},
606608
ChannelMonitorUpdateResult::UpdateComplete => {
607609
log_info!(self.logger, "Finished persisting new ChannelMonitor for channel {}", log_funding_info!(monitor));
608610
}
609611
}
610-
if persist_res == ChannelMonitorUpdateResult::PermanentFailure {
611-
return persist_res;
612-
}
613-
if persist_res== ChannelMonitorUpdateResult::UpdateInProgress {
614-
pending_monitor_updates.push(update_id);
615-
}
616612
if let Some(ref chain_source) = self.chain_source {
617613
monitor.load_outputs_to_watch(chain_source);
618614
}

0 commit comments

Comments
 (0)