Merge pull request #89 from jl777/dev

Dev
This commit is contained in:
jl777
2016-12-15 00:28:37 +02:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -617,10 +617,13 @@ void static BitcoinMiner(CWallet *pwallet)
savebits = pblock->nBits; savebits = pblock->nBits;
arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits); arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits);
if ( ASSETCHAINS_SYMBOL[0] == 0 && komodo_is_special(pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 ) if ( ASSETCHAINS_SYMBOL[0] == 0 && komodo_is_special(pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 )
{
if ( (Mining_height % KOMODO_ELECTION_GAP) > 64 || (Mining_height % KOMODO_ELECTION_GAP) == 0 )
{ {
hashTarget = arith_uint256().SetCompact(KOMODO_MINDIFF_NBITS); hashTarget = arith_uint256().SetCompact(KOMODO_MINDIFF_NBITS);
fprintf(stderr,"I am the chosen one for %s ht.%d\n",ASSETCHAINS_SYMBOL,pindexPrev->nHeight+1); fprintf(stderr,"I am the chosen one for %s ht.%d\n",ASSETCHAINS_SYMBOL,pindexPrev->nHeight+1);
} else Mining_start = 0; } else Mining_start = 0;
} else Mining_start = 0;
while (true) while (true)
{ {
if ( ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT ) if ( ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT )

View File

@@ -163,7 +163,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
for (i=31; i>=0; i--) for (i=31; i>=0; i--)
printf("%02x",((uint8_t *)&bnTarget)[i]); printf("%02x",((uint8_t *)&bnTarget)[i]);
printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35));
if ( height < 90000 || height > 110000 ) if ( height < 90000 || (height > 110000 && KOMODO_REWIND == 0) )
return error("CheckProofOfWork(): hash doesn't match nBits"); return error("CheckProofOfWork(): hash doesn't match nBits");
} }
} }