test: retry download in get_previous_releases.py
What changed, and why it matters
This is a test-only helper script that downloads old Bitcoin Core release binaries for testing. The change simply retries a failed download once after a 12-second wait. It is not a security fix and does not affect the Bitcoin Core software users run.
No security action required. Treat as a normal test infrastructure reliability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies test/get_previous_releases.py to add a single retry with a 12-second sleep in the download_binary() function when downloading previous release archives. The retry is wrapped in a second try/except; if the retry also fails the function still returns 1. No cryptographic verification, network trust model, or runtime node behavior is changed.
Changed components
test/get_previous_releases.pyInspect captured patch +7 / −1
diff --git a/test/get_previous_releases.py b/test/get_previous_releases.py
index ecb585c1..0ca00ace 100755
--- a/test/get_previous_releases.py
+++ b/test/get_previous_releases.py
@@ -168,7 +168,13 @@ def download_binary(tag, args) -> int:
download_from_url(archive_url, archive)
except Exception as e:
print(f"\nDownload failed: {e}", file=sys.stderr)
- return 1
+ print("Retrying download after failure ...", file=sys.stderr)
+ time.sleep(12)
+ try:
+ download_from_url(archive_url, archive)
+ except Exception as e2:
+ print(f"\nDownload failed a second time: {e2}", file=sys.stderr)
+ return 1
hasher = hashlib.sha256()
with open(archive, "rb") as afile:
Why this scored 16/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.