Make nBlockPrioritySize and nBlockMinSize consts

This commit is contained in:
Duke
2024-09-20 11:24:59 -04:00
parent 5a3c06e539
commit dfeccf6ce4

View File

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