Skip to content

fix: use BlockNotFound instead of OutOfSync with timestamp#767

Open
forkfury wants to merge 1 commit intoa16z:masterfrom
forkfury:fix/out-of-sync-error-message
Open

fix: use BlockNotFound instead of OutOfSync with timestamp#767
forkfury wants to merge 1 commit intoa16z:masterfrom
forkfury:fix/out-of-sync-error-message

Conversation

@forkfury
Copy link
Copy Markdown

When get_block returns None for Latest block, return BlockNotFound
error instead of OutOfSync with absolute timestamp. The previous
implementation would produce misleading error messages like "out of
sync: 1700000000 seconds behind" instead of a proper delay value.

Also replaced checked_sub().unwrap_or_default() with saturating_sub()
to satisfy clippy warnings.

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