From a4b552eb8383232ce9969cc7b1118adb79a122c3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Aug 2019 22:24:54 -1100 Subject: [PATCH] Fix origtarget --- src/pow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 564ab9be8..0d82fa246 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -157,7 +157,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead block3sum = (block4diff - tipdiff); block6sum = (block7diff - tipdiff); block11sum = (block12diff - tipdiff); - origtarget = bnTarget = arith_uint256().SetCompact(nbits); + bnTarget = arith_uint256().SetCompact(nbits); easy.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow); if ( block3sum < ASSETCHAINS_BLOCKTIME/5 || block6sum < ASSETCHAINS_BLOCKTIME ) { @@ -194,6 +194,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??? { flag = 1; + origtarget = bnTarget; bnTarget = zawy_exponential(bnTarget,mult); if ( bnTarget < origtarget || bnTarget > easy ) {