Skip to content

Conversation

@ZiggySchulz
Copy link
Contributor

Fixes the '1000/1000 Blocks Verified' message which previously would show an incorrect denominator.
Previously the total was the total block height, whereas now it is the number of blocks to be verified. The numerator in the message was also often set to 1000 prematurely as this occurred after reaching a block with height divisible by 1000, even if this is the first block.

This also fixes an off-by-one error where 1001 block would be verified rather than 1000, which is the expected default.
Note that the documentation lists this for the -checkblocks= argument
"How many blocks to check at startup (default: 2500, 0 = all)"
but this does not seem to be accurate as 0 isn't handled and the default is 1000.
This is not handled in this PR

…correct total

This also fixes an off by one error where 1001 block would be checked rather than 1000, for example
@jamescowens
Copy link
Member

Yep. I had noticed this a long time ago, but never got around to fixing it. Glad you took a whack at it.

@jamescowens jamescowens self-requested a review June 20, 2025 14:38
@jamescowens jamescowens added this to the Natasha milestone Jun 20, 2025
Copy link
Member

@jamescowens jamescowens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@jamescowens jamescowens merged commit ee9cd85 into gridcoin-community:development Jul 2, 2025
25 checks passed
@ZiggySchulz ZiggySchulz deleted the validation-message-fix branch July 5, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants