This commit is contained in:
jl777
2018-04-09 20:06:19 +03:00
parent dd5541420a
commit 8e9ef91cf4

View File

@@ -752,7 +752,7 @@ void static BitcoinMiner()
Mining_height = pindexPrev->nHeight+1; Mining_height = pindexPrev->nHeight+1;
Mining_start = (uint32_t)time(NULL); Mining_start = (uint32_t)time(NULL);
} }
if ( ASSETCHAINS_SYMBOL[0] != 0 ) if ( ASSETCHAINS_SYMBOL[0] != 0 && ASSETCHAINS_STAKED == 0 )
{ {
//fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height); //fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height);
sleep(3); sleep(3);
@@ -900,7 +900,9 @@ void static BitcoinMiner()
// fprintf(stderr," missed target\n"); // fprintf(stderr," missed target\n");
return false; return false;
} }
if ( /*ASSETCHAINS_SYMBOL[0] == 0 &&*/ Mining_start != 0 && time(NULL) < Mining_start+roundrobin_delay ) if ( ASSETCHAINS_STAKED == 0 )
{
if ( Mining_start != 0 && time(NULL) < Mining_start+roundrobin_delay )
{ {
//printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+roundrobin_delay-time(NULL))); //printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+roundrobin_delay-time(NULL)));
int32_t nseconds = Mining_start+roundrobin_delay-time(NULL); int32_t nseconds = Mining_start+roundrobin_delay-time(NULL);
@@ -912,6 +914,13 @@ void static BitcoinMiner()
{ {
sleep(rand() % 30); sleep(rand() % 30);
} }
}
else
{
printf("need to wait %d seconds to submit\n",(int32_t)(pblock->nTime - GetAdjustedTime()));
while ( GetAdjustedTime() < pblock->nTime )
sleep(1);
}
KOMODO_CHOSEN_ONE = 1; KOMODO_CHOSEN_ONE = 1;
// Found a solution // Found a solution
SetThreadPriority(THREAD_PRIORITY_NORMAL); SetThreadPriority(THREAD_PRIORITY_NORMAL);