Skip to content

Commit 4f2bb47

Browse files
committed
f only print success on success
1 parent 8d2bfc4 commit 4f2bb47

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,9 @@ where C::Target: chain::Filter,
281281
if let Err(e) = self.persister.persist_new_channel(funding_outpoint, &monitor) {
282282
log_error!(self.logger, "Failed to persist new channel data");
283283
return Err(e);
284+
} else {
285+
log_trace!(self.logger, "Finished persisting new Channel Monitor for channel {}", log_bytes!(funding_txo.0.to_channel_id()[..]));
284286
}
285-
log_trace!(self.logger, "Finished persisting new Channel Monitor for channel {}", log_bytes!(funding_txo.0.to_channel_id()[..]));
286287
if let Some(ref chain_source) = self.chain_source {
287288
monitor.load_outputs_to_watch(chain_source);
288289
}
@@ -318,8 +319,9 @@ where C::Target: chain::Filter,
318319
let persist_res = self.persister.update_persisted_channel(funding_txo, &update, monitor);
319320
if let Err(ref e) = persist_res {
320321
log_error!(self.logger, "Failed to persist channel monitor update: {:?}", e);
322+
} else {
323+
log_trace!(self.logger, "Finished persisting Channel Monitor Update for channel {}", log_funding_info!(monitor));
321324
}
322-
log_trace!(self.logger, "Finished persisting Channel Monitor Update for channel {}", log_funding_info!(monitor));
323325
if update_res.is_err() {
324326
Err(ChannelMonitorUpdateErr::PermanentFailure)
325327
} else {

0 commit comments

Comments
 (0)