@@ -451,7 +451,7 @@ int8_t komodo_minerid(int32_t height)
|
|||||||
{
|
{
|
||||||
static uint32_t depth;
|
static uint32_t depth;
|
||||||
int32_t notaryid; CBlockIndex *pindex; uint8_t pubkey33[33];
|
int32_t notaryid; CBlockIndex *pindex; uint8_t pubkey33[33];
|
||||||
if ( depth == 0 && height <= CURRENT_HEIGHT )//chainActive.Tip()->nHeight )
|
if ( depth < 3 && height <= CURRENT_HEIGHT )//chainActive.Tip()->nHeight )
|
||||||
{
|
{
|
||||||
if ( (pindex= chainActive[height]) != 0 )
|
if ( (pindex= chainActive[height]) != 0 )
|
||||||
{
|
{
|
||||||
@@ -479,7 +479,7 @@ int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33])
|
|||||||
if ( Minerids[height - i] == -2 )
|
if ( Minerids[height - i] == -2 )
|
||||||
{
|
{
|
||||||
//fprintf(stderr,"second -2 for Minerids[%d] current.%d\n",height-i,CURRENT_HEIGHT);
|
//fprintf(stderr,"second -2 for Minerids[%d] current.%d\n",height-i,CURRENT_HEIGHT);
|
||||||
return(0);
|
return(-2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( Minerids[height-i] == notaryid )
|
if ( Minerids[height-i] == notaryid )
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
|
|||||||
if ( pax->marked != 0 )
|
if ( pax->marked != 0 )
|
||||||
errs++;
|
errs++;
|
||||||
else matched++;
|
else matched++;
|
||||||
if ( opcode == 'X' )
|
if ( 0 && opcode == 'X' )
|
||||||
printf("errs.%d i.%d match %.8f == %.8f\n",errs,i,dstr(pax != 0 ? pax->fiatoshis:-1),dstr(block.vtx[0].vout[i].nValue));
|
printf("errs.%d i.%d match %.8f == %.8f\n",errs,i,dstr(pax != 0 ? pax->fiatoshis:-1),dstr(block.vtx[0].vout[i].nValue));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ extern int8_t Minerids[1024 * 1024 * 5]; // 5 million blocks
|
|||||||
|
|
||||||
bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned int nBits, const Consensus::Params& params)
|
bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned int nBits, const Consensus::Params& params)
|
||||||
{
|
{
|
||||||
bool fNegative,fOverflow; int32_t i,nonz=0,special,notaryid,flag = 0;
|
bool fNegative,fOverflow; int32_t i,nonz=0,special,special2,notaryid,flag = 0;
|
||||||
arith_uint256 bnTarget;
|
arith_uint256 bnTarget;
|
||||||
|
|
||||||
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
|
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
|
||||||
@@ -131,8 +131,9 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
|
|||||||
{
|
{
|
||||||
if ( notaryid >= 0 )
|
if ( notaryid >= 0 )
|
||||||
{
|
{
|
||||||
if ( (height < 70000 && (special != 0 || komodo_is_special(height,pubkey33) > 0)) ||
|
special2 = komodo_is_special(height,pubkey33);
|
||||||
(height >= 70000 && komodo_is_special(height,pubkey33) > 0) )
|
if ( special2 == -2 || (height < 70000 && (special != 0 || special2 > 0)) ||
|
||||||
|
(height >= 70000 && special2 > 0) )
|
||||||
{
|
{
|
||||||
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
|
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
|
||||||
flag = 1;
|
flag = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user