/Users/eugenesiegel/btc/bitcoin/src/node/peerman_args.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | #include <node/peerman_args.h> |
2 | | |
3 | | #include <common/args.h> |
4 | | #include <net_processing.h> |
5 | | |
6 | | #include <algorithm> |
7 | | #include <limits> |
8 | | |
9 | | namespace node { |
10 | | |
11 | | void ApplyArgsManOptions(const ArgsManager& argsman, PeerManager::Options& options) |
12 | 49.9k | { |
13 | 49.9k | if (auto value{argsman.GetBoolArg("-txreconciliation")}) options.reconcile_txs = *value; |
14 | | |
15 | 49.9k | if (auto value{argsman.GetIntArg("-maxorphantx")}) { |
16 | 0 | options.max_orphan_txs = uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max()))); |
17 | 0 | } |
18 | | |
19 | 49.9k | if (auto value{argsman.GetIntArg("-blockreconstructionextratxn")}) { |
20 | 0 | options.max_extra_txs = uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max()))); |
21 | 0 | } |
22 | | |
23 | 49.9k | if (auto value{argsman.GetBoolArg("-capturemessages")}) options.capture_messages = *value0 ; |
24 | | |
25 | 49.9k | if (auto value{argsman.GetBoolArg("-blocksonly")}) options.ignore_incoming_txs = *value0 ; |
26 | 49.9k | } |
27 | | |
28 | | } // namespace node |
29 | | |