aboutsummaryrefslogtreecommitdiff
path: root/src/node/peerman_args.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/peerman_args.cpp')
-rw-r--r--src/node/peerman_args.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/node/peerman_args.cpp b/src/node/peerman_args.cpp
new file mode 100644
index 0000000000..e5868ead12
--- /dev/null
+++ b/src/node/peerman_args.cpp
@@ -0,0 +1,24 @@
+#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));
+ }
+
+ if (auto value{argsman.GetBoolArg("-capturemessages")}) options.capture_messages = *value;
+}
+
+} // namespace node
+