From 53bf8107c0d183a1182c6b5ee4afca5b48b0973f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Aug 2019 09:31:58 -1100 Subject: [PATCH] Change ct[] to double diff --- src/pow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index c9ab3e726..9bb1c3ffc 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -229,6 +229,8 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead for (i=0; pindexFirst != 0 && i<(int32_t)(sizeof(ct)/sizeof(*ct)); i++) { ct[i].SetCompact(pindexFirst->nBits); + if ( pindexLast->GetHeight()+1 >= 310 ) + ct[i] /= arith_uint256(2); ts[i] = pindexFirst->nTime; pindexFirst = pindexFirst->pprev; } @@ -314,7 +316,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead bnTarget = (origtarget + bnTarget + bnPrev) / arith_uint256(3); else bnTarget = origtarget; } - else + else if ( pindexLast->GetHeight()+1 < 310 ) { bnTarget /= arith_uint256(2); if ( bnTarget < origtarget )