Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
251'./depends/config.guess').decode())252platforms = {253'aarch64-*-linux*': 'aarch64-linux-gnu',254'powerpc64le-*-linux-*': 'powerpc64le-linux-gnu',255'riscv64-*-linux*': 'riscv64-linux-gnu',256'x86_64-*-linux*': 'x86_64-linux-gnu',257'x86_64-apple-darwin*': 'x86_64-apple-darwin',258'aarch64-apple-darwin*': 'arm64-apple-darwin',259}260args.host = ''261for pattern, target in platforms.items():262if fnmatch(host, pattern):263args.host = target264if not args.host:265print('Not sure which binary to download for {}'.format(host), file=sys.stderr)266return 1267return 0270def main(args) -> int:271Path(args.target_dir).mkdir(exist_ok=True, parents=True)272print("Releases directory: {}".format(args.target_dir))273ret = set_host(args)274if ret:275return ret276with pushd(args.target_dir):277for tag in args.tags:278ret = download_binary(tag, args)279if ret:280return ret281return 0284if __name__ == '__main__':285parser = argparse.ArgumentParser(286formatter_class=argparse.ArgumentDefaultsHelpFormatter,287epilog='''288HOST can be set to any of the `host-platform-triplet`s from289depends/README.md for which a release exists.290''',291)292previous_releases_path = os.getenv("PREVIOUS_RELEASES_DIR") or os.getcwd() + "/releases"293parser.add_argument('-r', '--remove-dir', action='store_true',294help='remove existing directory.')295parser.add_argument('-t', '--target-dir', action='store',296default=previous_releases_path,297help='target directory, defaults to '298'environment\'s PREVIOUS_RELEASES_DIR if set, '299'otherwise to "./releases".'300)301all_tags = sorted([*set([v['tag'] for v in SHA256_SUMS.values()])])302parser.add_argument('tags', nargs='*', default=all_tags,303help='release tags. e.g.: v0.18.1 v0.20.0rc2 '304'(if not specified, the full list needed for '305'backwards compatibility tests will be used)'306)307args = parser.parse_args()308sys.exit(main(args))
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.