diff --git a/src/init.cpp b/src/init.cpp index 997996ef12a..438ac8ff24f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1540,9 +1540,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) ChainstateManager& chainman = *Assert(node.chainman); - PeerManager::Options peerman_opts{ - .ignore_incoming_txs = ignores_incoming_txs, - }; + PeerManager::Options peerman_opts{}; ApplyArgsManOptions(args, peerman_opts); assert(!node.peerman); diff --git a/src/node/peerman_args.cpp b/src/node/peerman_args.cpp index e5868ead125..e0dcf21c33f 100644 --- a/src/node/peerman_args.cpp +++ b/src/node/peerman_args.cpp @@ -18,6 +18,8 @@ void ApplyArgsManOptions(const ArgsManager& argsman, PeerManager::Options& optio } if (auto value{argsman.GetBoolArg("-capturemessages")}) options.capture_messages = *value; + + if (auto value{argsman.GetBoolArg("-blocksonly")}) options.ignore_incoming_txs = *value; } } // namespace node