You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dash-spv: filter header sync restarts at height 0 after truncating to genesis #1397
FilterHeadersManager reads the stored filter tip with get_filter_tip_height().await?.unwrap_or(0) (dash-spv/src/sync/filter_headers/manager.rs), so a storage holding only the genesis filter header (Some(0)) looks empty (None). The sync then starts at height 0 instead of 1 and rewrites the stored header at 0.
This happens after truncate_above(0), for example when a fork is followed down to genesis. In debug builds it panics on the debug_assert in Segment::insert (dash-spv/src/storage/segments.rs), which kills the filter header task. In release builds the slot is silently overwritten.
The start height should come from the Option: None starts at the header start height, Some(n) at n + 1.
Activity