File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class ChainstateManager;
1717/* * Whether transaction reconciliation protocol should be enabled by default. */
1818static constexpr bool DEFAULT_TXRECONCILIATION_ENABLE{false };
1919/* * Default for -maxorphantx, maximum number of orphan transactions kept in memory */
20- static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100 ;
20+ static const uint32_t DEFAULT_MAX_ORPHAN_TRANSACTIONS{ 100 } ;
2121/* * Default number of non-mempool transactions to keep around for block reconstruction. Includes
2222 orphan, replaced, and rejected transactions. */
2323static const unsigned int DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN = 100 ;
Original file line number Diff line number Diff line change 33#include < common/args.h>
44#include < net_processing.h>
55
6+ #include < algorithm>
7+ #include < limits>
8+
69namespace node {
710
811void ApplyArgsManOptions (const ArgsManager& argsman, PeerManager::Options& options)
912{
1013 if (auto value{argsman.GetBoolArg (" -txreconciliation" )}) options.reconcile_txs = *value;
1114
1215 if (auto value{argsman.GetIntArg (" -maxorphantx" )}) {
13- options.max_orphan_txs = uint32_t (std::max ( int64_t { 0 }, *value ));
16+ options.max_orphan_txs = uint32_t (( std::clamp< int64_t >(*value, 0 , std::numeric_limits< uint32_t >:: max ()) ));
1417 }
1518
1619 if (auto value{argsman.GetIntArg (" -blockreconstructionextratxn" )}) {
You can’t perform that action at this time.
0 commit comments