From f77173b2d91c6dabf8d8d7b5d4e94e5f1562f29f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Aug 2019 09:16:53 -1100 Subject: [PATCH] Test --- src/pow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index a0352c807..c9ab3e726 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -307,13 +307,20 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead if ( bnTarget < origtarget ) bnTarget = bnTarget * arith_uint256(2); } - else + else if ( pindexLast->GetHeight()+1 < 310 ) { bnTarget *= arith_uint256(2); if ( bnTarget < origtarget ) bnTarget = (origtarget + bnTarget + bnPrev) / arith_uint256(3); else bnTarget = origtarget; } + else + { + bnTarget /= arith_uint256(2); + if ( bnTarget < origtarget ) + bnTarget = (bnTarget + bnPrev) / arith_uint256(2); + else bnTarget = origtarget; + } } } nbits = bnTarget.GetCompact();