From 0b163c5aa014d236ebecef11f0a8633986667671 Mon Sep 17 00:00:00 2001 From: pauldelucia Date: Thu, 27 Nov 2025 15:07:37 +0700 Subject: [PATCH 1/2] fix: filters start from checkpoint on reconnect --- dash-spv/src/storage/disk/filters.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dash-spv/src/storage/disk/filters.rs b/dash-spv/src/storage/disk/filters.rs index 0d6bcf457..eedca2f62 100644 --- a/dash-spv/src/storage/disk/filters.rs +++ b/dash-spv/src/storage/disk/filters.rs @@ -19,7 +19,15 @@ impl DiskStorageManager { let mut next_blockchain_height = { let current_tip = self.cached_filter_tip_height.read().await; match *current_tip { - Some(tip) => tip + 1, + Some(tip) => { + // If we're syncing from a checkpoint and the current tip is below it, + // start from the checkpoint instead of continuing from the old tip + if sync_base_height > 0 && tip < sync_base_height { + sync_base_height + } else { + tip + 1 + } + } None => { // If we have a checkpoint, start from there, otherwise from 0 if sync_base_height > 0 { From 050a5cd4d8eebe155d46947d6d332a2a4793a796 Mon Sep 17 00:00:00 2001 From: pauldelucia Date: Thu, 27 Nov 2025 15:16:22 +0700 Subject: [PATCH 2/2] doc: remove doc --- dash-spv/src/storage/disk/filters.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/dash-spv/src/storage/disk/filters.rs b/dash-spv/src/storage/disk/filters.rs index eedca2f62..8d0110dd4 100644 --- a/dash-spv/src/storage/disk/filters.rs +++ b/dash-spv/src/storage/disk/filters.rs @@ -20,8 +20,6 @@ impl DiskStorageManager { let current_tip = self.cached_filter_tip_height.read().await; match *current_tip { Some(tip) => { - // If we're syncing from a checkpoint and the current tip is below it, - // start from the checkpoint instead of continuing from the old tip if sync_base_height > 0 && tip < sync_base_height { sync_base_height } else {