From 4d644ae29bfdb86eeec7b41aedeb6a2938f3a70b Mon Sep 17 00:00:00 2001 From: miketout <23489320+miketout@users.noreply.github.com> Date: Sat, 7 Dec 2019 22:47:51 -0800 Subject: [PATCH] Full fix for incorrect solution --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index bfa4fc9fa..b8008c13d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5293,7 +5293,7 @@ bool ContextualCheckBlock( std::vector 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"); } -- 2.42.0