This commit is contained in:
jl777
2017-02-19 07:07:58 +02:00
parent 899e372886
commit 9661ca22bb

View File

@@ -128,9 +128,6 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
if ( height == 0 )
height = komodo_currentheight() + 1;
special = komodo_chosennotary(&notaryid,height,pubkey33);
//for (i=0; i<33; i++)
// printf("%02x",pubkey33[i]);
//printf(" <- ht.%d\n",height);
flag = komodo_eligiblenotary(pubkeys,mids,&nonzpkeys,height);
if ( height > 34000 ) // 0 -> non-special notary
{
@@ -142,14 +139,6 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
if ( nonz == 0 )
return(true); // will come back via different path with pubkey set
special2 = komodo_is_special(height,pubkey33);
/*if ( notaryid >= 0 && ((height >= 64000 && height <= 90065) || (height % KOMODO_ELECTION_GAP) > 64) )
{
if ( (height >= 64000 && height <= 90065) || (height % KOMODO_ELECTION_GAP) == 0 || (height < 80000 && (special != 0 || special2 > 0)) || (height >= 80000 && special2 > 0) )
{
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
flag = 1;
}
}*/
if ( notaryid >= 0 )
{
if ( height > 10000 && height < 80000 && (special != 0 || special2 > 0) )
@@ -182,15 +171,20 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
for (i=0; i<66; i++)
printf("%d ",mids[i]);
printf(" minerids from ht.%d\n",height);
if ( notaryid == -1 )
{
sleep(3);
komodo_chosennotary(&notaryid,height,pubkey33);
if ( notaryid >= 0 )
{
flag = komodo_eligiblenotary(pubkeys,mids,&nonzpkeys,height);
printf("found notaryid.%d flag.%d\n",notaryid,flag);
return(true);
}
}
return error("CheckProofOfWork(): hash doesn't match nBits");
}
}
if ( 0 && height > 180000 && nonzpkeys > 0 && strcmp((char *)NOTARY_PUBKEY.c_str(),"03b7621b44118017a16043f19b30cc8a4cfe068ac4e42417bae16ba460c80f3828") == 0 )
{
for (i=0; i<66; i++)
fprintf(stderr,"%d ",mids[i]);
fprintf(stderr," minerids from ht.%d\n",height);
}
return true;
}