Don't prune last hour

This commit is contained in:
Hanh 2023-02-02 10:11:17 +08:00
parent 3565a6297f
commit 46dba8c6ff
1 changed files with 2 additions and 1 deletions

View File

@ -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,