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.
251fs::path input_path(*(argv + i));252if (fs::is_directory(input_path)) {253std::vector<fs::path> files;254for (fs::directory_iterator it(input_path); it != fs::directory_iterator(); ++it) {255if (!fs::is_regular_file(it->path())) continue;256files.emplace_back(it->path());257}258std::ranges::shuffle(files, std::mt19937{std::random_device{}()});259for (const auto& input_path : files) {260g_input_path = input_path;261Assert(read_file(input_path, buffer));262test_one_input(buffer);263++tested;264buffer.clear();265}266} else {267g_input_path = input_path;268Assert(read_file(input_path, buffer));269test_one_input(buffer);270++tested;271buffer.clear();272}273}274const auto end_time{Now<SteadySeconds>()};275std::cout << g_fuzz_target << ": succeeded against " << tested << " files in " << count_seconds(end_time - start_time) << "s." << std::endl;276#endif277return 0;278}279#endif
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.