mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
internal/download: improve
This commit is contained in:
parent
47193f6459
commit
a6baf48021
1 changed files with 1 additions and 1 deletions
|
|
@ -156,6 +156,7 @@ func (db *ChecksumDB) VerifyAll() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// verifyHash checks that the file at 'path' has the expected hash.
|
||||||
func verifyHash(path, expectedHash string) error {
|
func verifyHash(path, expectedHash string) error {
|
||||||
fd, err := os.Open(path)
|
fd, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -172,7 +173,6 @@ func verifyHash(path, expectedHash string) error {
|
||||||
return fmt.Errorf("invalid file hash: %s %s", fileHash, filepath.Base(path))
|
return fmt.Errorf("invalid file hash: %s %s", fileHash, filepath.Base(path))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DownloadFileFromKnownURL downloads a file from the URL defined in the checksum database.
|
// DownloadFileFromKnownURL downloads a file from the URL defined in the checksum database.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue