Fix easy diff to set zawyflag

This commit is contained in:
jl777
2019-08-08 04:48:40 -11:00
parent 1ec92e3df2
commit 53d54c2652

View File

@@ -391,7 +391,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
bnTarget = arith_uint256().SetCompact(nbits); bnTarget = arith_uint256().SetCompact(nbits);
if ( height > (int32_t)(sizeof(ct)/sizeof(*ct)) && pblock != 0 && tipdiff > 0 ) if ( height > (int32_t)(sizeof(ct)/sizeof(*ct)) && pblock != 0 && tipdiff > 0 )
{ {
easy.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow); easy.SetCompact(KOMODO_MINDIFF_NBITS & (~3),&fNegative,&fOverflow);
if ( pblock != 0 ) if ( pblock != 0 )
{ {
origtarget = bnTarget; origtarget = bnTarget;
@@ -442,7 +442,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
{ {
bnTarget = easy; bnTarget = easy;
fprintf(stderr,"cmp.%d mult.%d ht.%d -> easy target\n",mult>1,(int32_t)mult,height); fprintf(stderr,"cmp.%d mult.%d ht.%d -> easy target\n",mult>1,(int32_t)mult,height);
return(KOMODO_MINDIFF_NBITS); return(KOMODO_MINDIFF_NBITS & (~3));
} }
{ {
int32_t z; int32_t z;