refactor: set ignore_incoming_txs in ApplyArgsManOptions

Refactor to consistently use ApplyArgsManOptions to set all PeerManager::Options,
including ignore_incoming_txs.
pull/28148/head
stickies-v 1 year ago
parent e35fb7bc48
commit 5f41afcc46
No known key found for this signature in database
GPG Key ID: 5CB1CE6E5E66A757

@ -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);

@ -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

Loading…
Cancel
Save