go-ethereum/internal/download
Andrii Furmanets 4ff33ba1b6
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
internal/download: only report stale existing downloads (#34849)
## Summary

Fixes #31917.

`geth era-download` now only prints `is stale` when an existing
downloaded file fails checksum verification. Missing files are still
downloaded normally, but no longer get mislabeled as stale.

## Why

`DownloadFile` used `verifyHash` for both missing files and checksum
mismatches, then printed `is stale` for any error. This made first-time
downloads look like corrupt or outdated files.

## Validation

- `make all`
- `go run ./build/ci.go test`
- `go run ./build/ci.go lint`
- `go run ./build/ci.go check_generate`
- `go run ./build/ci.go check_baddeps`

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2026-05-05 22:17:09 +02:00
..
download.go internal/download: only report stale existing downloads (#34849) 2026-05-05 22:17:09 +02:00