From: Jurvis Tan <5944973+jurvis@users.noreply.github.com> Date: Tue, 3 May 2022 22:29:11 +0000 (-0700) Subject: Set last_prune_call outside of persistence block X-Git-Tag: v0.0.107~42^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=e06bfdfeb73fe170e277e42a71fb46968e84fc9c;p=rust-lightning Set last_prune_call outside of persistence block --- diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index e306aeb3c..107f65f9b 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -278,8 +278,6 @@ impl BackgroundProcessor { if let Err(e) = persister.persist_graph(handler.network_graph()) { log_error!(logger, "Error: Failed to persist network graph, check your disk and permissions {}", e) } - last_prune_call = Instant::now(); - have_pruned = true; } if let Some(ref scorer) = scorer { log_trace!(logger, "Persisting scorer"); @@ -287,6 +285,9 @@ impl BackgroundProcessor { log_error!(logger, "Error: Failed to persist scorer, check your disk and permissions {}", e) } } + + last_prune_call = Instant::now(); + have_pruned = true; } }