Browse Source

Fix easy diff to set zawyflag

pull/37/head
jl777 5 years ago
parent
commit
53d54c2652
  1. 4
      src/pow.cpp

4
src/pow.cpp

@ -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;

Loading…
Cancel
Save