miner: fix addPackageTxs unsigned integer overflow
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -397,8 +397,8 @@ void BlockAssembler::addPackageTxs(int& nPackagesSelected, int& nDescendantsUpda
|
|||||||
|
|
||||||
++nConsecutiveFailed;
|
++nConsecutiveFailed;
|
||||||
|
|
||||||
if (nConsecutiveFailed > MAX_CONSECUTIVE_FAILURES && nBlockWeight >
|
if (nConsecutiveFailed > MAX_CONSECUTIVE_FAILURES && nBlockWeight +
|
||||||
m_options.nBlockMaxWeight - BLOCK_FULL_ENOUGH_WEIGHT_DELTA) {
|
BLOCK_FULL_ENOUGH_WEIGHT_DELTA > m_options.nBlockMaxWeight) {
|
||||||
// Give up if we're close to full and haven't succeeded in a while
|
// Give up if we're close to full and haven't succeeded in a while
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user