Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ public TrieLogPruner(
BesuMetricCategory.PRUNER, "trie_log_pruned_orphan", "trie log pruned orphan");
}

public int initialize() {
return preloadQueue();
public void initialize() {
executeAsync.accept(this::preloadQueue);
}

private int preloadQueue() {
private void preloadQueue() {
LOG.atInfo()
.setMessage("Loading first {} trie logs from database...")
.addArgument(loadingLimit)
Expand All @@ -111,10 +111,9 @@ private int preloadQueue() {
});
LOG.atDebug().log("Pruned {} orphaned trie logs from database...", orphansPruned.intValue());
LOG.atInfo().log("Loaded {} trie logs from database", count);
return pruneFromQueue() + orphansPruned.intValue();
pruneFromQueue();
} catch (Exception e) {
LOG.error("Error loading trie logs from database, nothing pruned", e);
return 0;
}
}

Expand Down