go-ethereum/internal/download
YQ AltLayer 781b51893f internal/download: distinguish missing file from stale file in era download
When downloading era files, all files are reported as "stale" even when
they simply haven't been downloaded yet. This is confusing because
"stale" implies the file exists but has a mismatched hash.

The root cause is that verifyHash returns an error for both cases
(file not found and hash mismatch), and DownloadFile unconditionally
prints "is stale" for any error.

Distinguish the two cases by checking os.IsNotExist on the error from
verifyHash: print "not found, downloading" for missing files and
"is stale" only for files with a mismatched hash.

Fixes #31917
2026-03-01 12:41:57 +00:00
..
download.go internal/download: distinguish missing file from stale file in era download 2026-03-01 12:41:57 +00:00