]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Set last_prune_call outside of persistence block
authorJurvis Tan <5944973+jurvis@users.noreply.github.com>
Tue, 3 May 2022 22:29:11 +0000 (15:29 -0700)
committerJurvis Tan <5944973+jurvis@users.noreply.github.com>
Tue, 3 May 2022 22:29:11 +0000 (15:29 -0700)
lightning-background-processor/src/lib.rs

index e306aeb3c880247d1ea0c6b01c39abba2dfd75fd..107f65f9b74f141cdb087eded0befe59d4c9dfac 100644 (file)
@@ -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;
                                }
                        }