fixed issue with reindex and super blocks

This commit is contained in:
Evan Duffield 2015-06-16 07:04:50 -07:00
parent c40c1338c7
commit 5c4dc3727b

View File

@ -26,7 +26,7 @@ bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue){
//while syncing take the longest chain
if (fImporting || fReindex || pindexPrev->nHeight+1 < Checkpoints::GetTotalBlocksEstimate()) {
//super blocks will always be on these blocks, max 100 per budgeting
if(pindexPrev->nHeight+1 % GetBudgetPaymentCycleBlocks() < 100){
if((pindexPrev->nHeight+1) % GetBudgetPaymentCycleBlocks() < 100){
return true;
} else {
if(nBlockValue > nExpectedValue) return false;