aboutsummaryrefslogtreecommitdiff
path: root/src/node/peerman_args.cpp
blob: 4a000de83ff2ca6017a85c923e8d1144e7ccc067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <node/peerman_args.h>

#include <common/args.h>
#include <net_processing.h>

namespace node {

void ApplyArgsManOptions(const ArgsManager& argsman, PeerManager::Options& options)
{
    if (auto value{argsman.GetBoolArg("-txreconciliation")}) options.reconcile_txs = *value;

    if (auto value{argsman.GetIntArg("-maxorphantx")}) {
        options.max_orphan_txs = uint32_t(std::max(int64_t{0}, *value));
    }

    if (auto value{argsman.GetIntArg("-blockreconstructionextratxn")}) {
        options.max_extra_txs = size_t(std::max(int64_t{0}, *value));
    }
}

} // namespace node