mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
net processing: clamp -blockreconstructionextratxn to uint32_t bounds
Also changes max_extra_txs into a uint32_t to avoid platform-specific behaviour
This commit is contained in:
@@ -17,7 +17,7 @@ void ApplyArgsManOptions(const ArgsManager& argsman, PeerManager::Options& optio
|
||||
}
|
||||
|
||||
if (auto value{argsman.GetIntArg("-blockreconstructionextratxn")}) {
|
||||
options.max_extra_txs = size_t(std::max(int64_t{0}, *value));
|
||||
options.max_extra_txs = uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max())));
|
||||
}
|
||||
|
||||
if (auto value{argsman.GetBoolArg("-capturemessages")}) options.capture_messages = *value;
|
||||
|
||||
Reference in New Issue
Block a user