From dfeccf6ce488ebe7875dddb371de1464cc89a62a Mon Sep 17 00:00:00 2001 From: Duke Date: Fri, 20 Sep 2024 11:24:59 -0400 Subject: [PATCH] Make nBlockPrioritySize and nBlockMinSize consts --- src/miner.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 5cc09776c..ab5f8251c 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -207,13 +207,13 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32 // How much of the block should be dedicated to high-priority transactions, // included regardless of the fees they pay - unsigned int nBlockPrioritySize = GetArg("-blockprioritysize", DEFAULT_BLOCK_PRIORITY_SIZE); - nBlockPrioritySize = std::min(nBlockMaxSize, nBlockPrioritySize); + const unsigned int nBlockPrioritySize = std::min( nBlockMaxSize, GetArg("-blockprioritysize", DEFAULT_BLOCK_PRIORITY_SIZE) ); + // nBlockPrioritySize = std::min(nBlockMaxSize, nBlockPrioritySize); // Minimum block size you want to create; block will be filled with free transactions // until there are no more or the block reaches this size: - unsigned int nBlockMinSize = GetArg("-blockminsize", DEFAULT_BLOCK_MIN_SIZE); - nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize); + const unsigned int nBlockMinSize = std::min(nBlockMaxSize, GetArg("-blockminsize", DEFAULT_BLOCK_MIN_SIZE)); + // nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize); //fprintf(stderr,"%s: nBlockMaxSize=%u, nBlockPrioritySize=%u, nBlockMinSize=%u\n", __func__, nBlockMaxSize, nBlockPrioritySize, nBlockMinSize);