2023-04-20 13:05:23 +02:00
|
|
|
#include <node/peerman_args.h>
|
|
|
|
|
|
|
|
#include <common/args.h>
|
|
|
|
#include <net_processing.h>
|
|
|
|
|
|
|
|
namespace node {
|
|
|
|
|
|
|
|
void ApplyArgsManOptions(const ArgsManager& argsman, PeerManager::Options& options)
|
|
|
|
{
|
2023-04-20 13:33:11 +02:00
|
|
|
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));
|
|
|
|
}
|
2023-04-20 13:49:00 +02:00
|
|
|
|
|
|
|
if (auto value{argsman.GetIntArg("-blockreconstructionextratxn")}) {
|
|
|
|
options.max_extra_txs = size_t(std::max(int64_t{0}, *value));
|
|
|
|
}
|
2023-04-20 13:50:47 +02:00
|
|
|
|
|
|
|
if (auto value{argsman.GetBoolArg("-capturemessages")}) options.capture_messages = *value;
|
2023-04-20 13:05:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace node
|
|
|
|
|