Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
node
peerman_args.cpp
Go to the documentation of this file.
1
// Copyright (c) 2023-present The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or https://opensource.org/license/mit.
4
5
#include <
node/peerman_args.h
>
6
7
#include <
common/args.h
>
8
#include <
net_processing.h
>
9
10
#include <algorithm>
11
#include <limits>
12
13
namespace
node
{
14
15
void
ApplyArgsManOptions
(
const
ArgsManager
& argsman,
PeerManager::Options
& options)
16
{
17
if
(
auto
value{argsman.
GetBoolArg
(
"-txreconciliation"
)}) options.
reconcile_txs
= *value;
18
19
if
(
auto
value{argsman.
GetIntArg
(
"-blockreconstructionextratxn"
)}) {
20
options.
max_extra_txs
= uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max())));
21
}
22
23
if
(
auto
value{argsman.
GetBoolArg
(
"-capturemessages"
)}) options.
capture_messages
= *value;
24
25
if
(
auto
value{argsman.
GetBoolArg
(
"-blocksonly"
)}) options.
ignore_incoming_txs
= *value;
26
27
if
(
auto
value{argsman.
GetBoolArg
(
"-privatebroadcast"
)}) options.
private_broadcast
= *value;
28
}
29
30
}
// namespace node
31
args.h
ArgsManager
Definition
args.h:103
ArgsManager::GetIntArg
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const
Definition
args.h:306
ArgsManager::GetBoolArg
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
Definition
args.cpp:515
node
Definition
messages.h:21
node::ApplyArgsManOptions
util::Result< void > ApplyArgsManOptions(const ArgsManager &args, BlockManager::Options &opts)
Definition
blockmanager_args.cpp:18
net_processing.h
peerman_args.h
PeerManager::Options
Definition
net_processing.h:79
PeerManager::Options::reconcile_txs
bool reconcile_txs
Whether transaction reconciliation protocol is enabled.
Definition
net_processing.h:83
PeerManager::Options::max_extra_txs
uint32_t max_extra_txs
Definition
net_processing.h:86
PeerManager::Options::private_broadcast
bool private_broadcast
Whether private broadcast is used for sending transactions.
Definition
net_processing.h:96
PeerManager::Options::ignore_incoming_txs
bool ignore_incoming_txs
Whether this node is running in -blocksonly mode.
Definition
net_processing.h:81
PeerManager::Options::capture_messages
bool capture_messages
Whether all P2P messages are captured to disk.
Definition
net_processing.h:88
Generated on
for Bitcoin Core by
1.17.0