Skip to content

Commit 5be42c5

Browse files
committed
f use persist_res for persistence res of a new monitor
1 parent 7b621a0 commit 5be42c5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,12 @@ where C::Target: chain::Filter,
372372
return Err(ChannelMonitorUpdateErr::PermanentFailure)},
373373
hash_map::Entry::Vacant(e) => e,
374374
};
375-
let update_res = self.persister.persist_new_channel(funding_outpoint, &monitor);
376-
if update_res.is_err() {
377-
log_error!(self.logger, "Failed to persist new channel data: {:?}", update_res);
375+
let persist_res = self.persister.persist_new_channel(funding_outpoint, &monitor);
376+
if persist_res.is_err() {
377+
log_error!(self.logger, "Failed to persist new channel data: {:?}", persist_res);
378378
}
379-
if update_res == Err(ChannelMonitorUpdateErr::PermanentFailure) {
380-
return update_res;
379+
if persist_res == Err(ChannelMonitorUpdateErr::PermanentFailure) {
380+
return persist_res;
381381
}
382382
{
383383
let funding_txo = monitor.get_funding_txo();
@@ -388,7 +388,7 @@ where C::Target: chain::Filter,
388388
}
389389
}
390390
entry.insert(MonitorHolder { monitor });
391-
update_res
391+
persist_res
392392
}
393393

394394
/// Note that we persist the given `ChannelMonitor` update while holding the

0 commit comments

Comments
 (0)