From 46dba8c6ff3933495fb527b409934d8f1656bad3 Mon Sep 17 00:00:00 2001 From: Hanh Date: Thu, 2 Feb 2023 10:11:17 +0800 Subject: [PATCH] Don't prune last hour --- src/db.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index cfcb174..ddace62 100644 --- a/src/db.rs +++ b/src/db.rs @@ -725,7 +725,8 @@ impl DbAdapter { const BLOCKS_PER_HOUR: u32 = 60 * 60 / 75; const BLOCKS_PER_DAY: u32 = 24 * BLOCKS_PER_HOUR; const BLOCKS_PER_MONTH: u32 = 30 * BLOCKS_PER_DAY; - for i in 1..=24 { + // Keep the last hour + for i in 2..=24 { // 1 checkpoint per hour self.prune_interval( height - i * BLOCKS_PER_HOUR,