Skip to content

Use block's number for heightToDownload when downloading headers - #10094

Closed
mininny wants to merge 2 commits into
erigontech:mainfrom
mininny:feature/block-download-heightToDownload
Closed

mininny wants to merge 2 commits into
erigontech:mainfrom
mininny:feature/block-download-heightToDownload

Conversation

@mininny

@mininny mininny commented Apr 27, 2024

Copy link
Copy Markdown
Contributor

Currently, blockDownloader uses 0 as a hard-coded value for heightToDownload. This isn't necessarily a problem because we are using hashToDownload to download the headers.

I modified the code to use block.Number() for heightToDownload because:

  1. in some random cases where hashToDownload is empty
  2. we can see blockHeight in logs rather than just hashes
  3. otherwise, we can also choose to just use 0 as default value when the hash is not available and remove unnecessary code.

I'd be open to go to #3 and rewrite this PR if you think it's more appropriate :)

@yperbasis
yperbasis changed the base branch from release/2.60 to main May 1, 2024 07:23
@yperbasis

Copy link
Copy Markdown
Member

Closing since it's very old

@yperbasis yperbasis closed this Sep 23, 2025
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.

3 participants