From f036bb7e90a229a7f5bc6491299f7e30befd424d Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Aug 2019 09:11:25 -1100 Subject: [PATCH] *= 2 and average --- src/pow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index da7c8595c..a0352c807 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -302,13 +302,19 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead bnTarget = (origtarget + bnTarget + bnPrev) / arith_uint256(3); else bnTarget = origtarget; } - else + else if ( pindexLast->GetHeight()+1 < 290 ) { if ( bnTarget < origtarget ) bnTarget = bnTarget * arith_uint256(2); } + else + { + bnTarget *= arith_uint256(2); + if ( bnTarget < origtarget ) + bnTarget = (origtarget + bnTarget + bnPrev) / arith_uint256(3); + else bnTarget = origtarget; + } } - } nbits = bnTarget.GetCompact(); }