Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tohsnoom committed Jan 31, 2019
2 parents b590166 + dab13ef commit a11876d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4586,7 +4586,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
if (it == mapStakeSpent.end()) {
return false;
}
if (it->second <= pindexPrev->nHeight) {
if (it->second < pindexPrev->nHeight) {
return false;
}
}
Expand All @@ -4598,7 +4598,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
CBlockIndex *last = pindexPrev;

// while that block is not on the main chain
while (!chainActive.Contains(last) && pindexPrev != NULL) {
while (!chainActive.Contains(last) && last != NULL) {
CBlock bl;
ReadBlockFromDisk(bl, last);
// loop through every spent input from said block
Expand All @@ -4616,7 +4616,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
}

// go to the parent block
last = pindexPrev->pprev;
last = last->pprev;
}
}
}
Expand Down

0 comments on commit a11876d

Please sign in to comment.