From 07112fe397ffed7d49827a971e3c6d4e9d0ab57a Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Aug 2019 21:57:01 -1100 Subject: [PATCH] Prevent max after min, even if booster --- src/pow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index 3d1a4f6e0..28462a815 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -176,7 +176,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead { bnTarget /= arith_uint256(100); fprintf(stderr,"ht.%d booster triggered 100x\n",(int32_t)pindexLast->GetHeight()+1); - flag = 0; + flag = -1; } if ( 0 ) { @@ -199,7 +199,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead } } } - if ( flag == 0 && mult > 1 ) // e^mult case, jl777: test of mult > 1 failed when it was int64_t??? + if ( flag <= 0 && mult > 1 ) // e^mult case, jl777: test of mult > 1 failed when it was int64_t??? { flag = 1; bnTarget = zawy_exponential(bnTarget,mult);