std::vector<unsigned char> vch = block.nSolution;
uint32_t ver = CVerusSolutionVector(vch).Version();
// we let some V3's slip by, so enforce correct version for all versions after V3
- if (ver < CActivationHeight::SOLUTION_VERUSV2 || (ver > CActivationHeight::SOLUTION_VERUSV3 && ver != CConstVerusSolutionVector::GetVersionByHeight(nHeight)))
+ if (ver < CActivationHeight::SOLUTION_VERUSV2 || (CConstVerusSolutionVector::GetVersionByHeight(nHeight) > CActivationHeight::SOLUTION_VERUSV3 && ver != CConstVerusSolutionVector::GetVersionByHeight(nHeight)))
{
return state.DoS(10, error("%s: block header has incorrect version", __func__), REJECT_INVALID, "incorrect-block-version");
}