test
This commit is contained in:
@@ -435,6 +435,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
|
|||||||
//
|
//
|
||||||
// Internal miner
|
// Internal miner
|
||||||
//
|
//
|
||||||
|
#define ROUNDROBIN_DELAY 10
|
||||||
extern int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY;
|
extern int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY;
|
||||||
extern std::string NOTARY_PUBKEY;
|
extern std::string NOTARY_PUBKEY;
|
||||||
extern uint8_t NOTARY_PUBKEY33[33];
|
extern uint8_t NOTARY_PUBKEY33[33];
|
||||||
@@ -621,10 +622,10 @@ void static BitcoinMiner(CWallet *pwallet)
|
|||||||
// printf("missed target\n");
|
// printf("missed target\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 && Mining_start != 0 && time(NULL) < Mining_start+20 )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 && Mining_start != 0 && time(NULL) < Mining_start+ROUNDROBIN_DELAY )
|
||||||
{
|
{
|
||||||
printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+20-time(NULL)));
|
printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+ROUNDROBIN_DELAY-time(NULL)));
|
||||||
sleep(Mining_start+20-time(NULL));
|
sleep(Mining_start+ROUNDROBIN_DELAY-time(NULL));
|
||||||
}
|
}
|
||||||
// Found a solution
|
// Found a solution
|
||||||
SetThreadPriority(THREAD_PRIORITY_NORMAL);
|
SetThreadPriority(THREAD_PRIORITY_NORMAL);
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
|
|||||||
//fprintf(stderr," height.%d special.%d nonz.%d\n",height,special,nonz);
|
//fprintf(stderr," height.%d special.%d nonz.%d\n",height,special,nonz);
|
||||||
if ( nonz == 0 )
|
if ( nonz == 0 )
|
||||||
return(true); // will come back via different path with pubkey set
|
return(true); // will come back via different path with pubkey set
|
||||||
else
|
else if ( 0 )
|
||||||
{
|
{
|
||||||
for (i=0; i<33; i++)
|
for (i=0; i<33; i++)
|
||||||
fprintf(stderr,"%02x",pubkey33[i]);
|
fprintf(stderr,"%02x",pubkey33[i]);
|
||||||
@@ -146,7 +146,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
|
|||||||
{
|
{
|
||||||
for (i=0; i<33; i++)
|
for (i=0; i<33; i++)
|
||||||
printf("%02x",pubkey33[i]);
|
printf("%02x",pubkey33[i]);
|
||||||
printf(" special.%d notaryid.%d ht.%d mod.%d\n",special,notaryid,height,(height % 35));
|
printf(" special.%d notaryid.%d ht.%d mod.%d error\n",special,notaryid,height,(height % 35));
|
||||||
return error("CheckProofOfWork(): hash doesn't match nBits");
|
return error("CheckProofOfWork(): hash doesn't match nBits");
|
||||||
}
|
}
|
||||||
if ( flag != 0 )
|
if ( flag != 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user