From 6c6699ef2b3498f47532192b4d25e818012c1aa2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Aug 2019 23:41:36 -1100 Subject: [PATCH] Fix flag order --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 63a396ec8..5a7f5b5c2 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -182,7 +182,6 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead bnTmp = bnSum12; if ( bnTmp < bnTarget ) { - flag = 1; bnTarget = (bnTmp + bnPrev) / arith_uint256(2); fprintf(stderr,"ht.%d block12diff %d vs %d, make harder\n",(int32_t)pindexLast->GetHeight()+1,block12diff,ASSETCHAINS_BLOCKTIME*11); if ( flag < 0 ) @@ -194,6 +193,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead bnTarget = bnTarget * arith_uint256(1000*tipdiff/120) / arith_uint256(1000); } } + flag = 1; } } if ( flag <= 0 && mult > 1 ) // e^mult case, jl777: test of mult > 1 failed when it was int64_t???