Inside Bitcoin
Opening the selected file…
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.
1// Copyright (c) 2023-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or https://opensource.org/license/mit.5#include <node/peerman_args.h>7#include <common/args.h>8#include <net_processing.h>10#include <algorithm>11#include <limits>13namespace node {15void ApplyArgsManOptions(const ArgsManager& argsman, PeerManager::Options& options)16{17if (auto value{argsman.GetBoolArg("-txreconciliation")}) options.reconcile_txs = *value;19if (auto value{argsman.GetIntArg("-blockreconstructionextratxn")}) {20options.max_extra_txs = uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max())));21}23if (auto value{argsman.GetBoolArg("-capturemessages")}) options.capture_messages = *value;25if (auto value{argsman.GetBoolArg("-blocksonly")}) options.ignore_incoming_txs = *value;27if (auto value{argsman.GetIntArg("-txsendrate")}) {28options.tx_send_rate = uint32_t(std::clamp<int64_t>(*value, 1, 1000));29}31if (auto value{argsman.GetBoolArg("-privatebroadcast")}) options.private_broadcast = *value;32}34} // namespace node