Skip to content

fix(sync): return 0 total_indexed blocks for initial unsynced SyncState - #298

Open
yappermoar-boop wants to merge 1 commit into
tempoxyz:mainfrom
yappermoar-boop:fix-sync-state-total-indexed-zero-unsynced-guard
Open

fix(sync): return 0 total_indexed blocks for initial unsynced SyncState#298
yappermoar-boop wants to merge 1 commit into
tempoxyz:mainfrom
yappermoar-boop:fix-sync-state-total-indexed-zero-unsynced-guard

Conversation

@yappermoar-boop

Copy link
Copy Markdown

Added an upfront check in total_indexed() in src/types.rs to return 0 when tip_num == 0 and backfill_num is None. Previously, evaluating high - low + 1 on initial default SyncState (0, 0) incorrectly reported 1 total indexed block before any blocks were synced, throwing off initial sync rate and ETA calculations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant