Skip to content

Commit fc86be9

Browse files
committed
f use persist_res for persistence res of a new monitor
1 parent 3966e82 commit fc86be9

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
@@ -373,12 +373,12 @@ where C::Target: chain::Filter,
373373
return Err(ChannelMonitorUpdateErr::PermanentFailure)},
374374
hash_map::Entry::Vacant(e) => e,
375375
};
376-
let update_res = self.persister.persist_new_channel(funding_outpoint, &monitor);
377-
if update_res.is_err() {
378-
log_error!(self.logger, "Failed to persist new channel data: {:?}", update_res);
376+
let persist_res = self.persister.persist_new_channel(funding_outpoint, &monitor);
377+
if persist_res.is_err() {
378+
log_error!(self.logger, "Failed to persist new channel data: {:?}", persist_res);
379379
}
380-
if update_res == Err(ChannelMonitorUpdateErr::PermanentFailure) {
381-
return update_res;
380+
if persist_res == Err(ChannelMonitorUpdateErr::PermanentFailure) {
381+
return persist_res;
382382
}
383383
{
384384
let funding_txo = monitor.get_funding_txo();
@@ -389,7 +389,7 @@ where C::Target: chain::Filter,
389389
}
390390
}
391391
entry.insert(MonitorHolder { monitor });
392-
update_res
392+
persist_res
393393
}
394394

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

0 commit comments

Comments
 (0)