X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fminer.cpp;fp=src%2Fminer.cpp;h=5d01bb2d2841a5565a99be6109726a846aceea27;hp=6057eecdda1103212d8d2ab0f511cbe9038b0fda;hb=9959068f2064bc67b1f41af0a5b49c1c37ea7003;hpb=5c1eeb6dbe62fd3394e50b2f97983388c169e9ba diff --git a/src/miner.cpp b/src/miner.cpp index 6057eec..5d01bb2 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -147,18 +147,18 @@ CBlock* CreateNewBlock(CWallet* pwallet, CTransaction *txCoinStake) } // Largest block you're willing to create: - unsigned int nBlockMaxSize = GetArg("-blockmaxsize", MAX_BLOCK_SIZE_GEN/2); + unsigned int nBlockMaxSize = GetArgUInt("-blockmaxsize", MAX_BLOCK_SIZE_GEN/2); // Limit to betweeen 1K and MAX_BLOCK_SIZE-1K for sanity: - nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SIZE-1000), nBlockMaxSize)); + nBlockMaxSize = std::max(1000u, std::min(MAX_BLOCK_SIZE-1000u, nBlockMaxSize)); // How much of the block should be dedicated to high-priority transactions, // included regardless of the fees they pay - unsigned int nBlockPrioritySize = GetArg("-blockprioritysize", 27000); + unsigned int nBlockPrioritySize = GetArgUInt("-blockprioritysize", 27000); 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", 0); + unsigned int nBlockMinSize = GetArgUInt("-blockminsize", 0); nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize); // Fee-per-kilobyte amount considered the same as "free"