|
|
@ -699,7 +699,7 @@ int32_t komodo_baseid(char *origbase); |
|
|
|
int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,uint32_t *blocktimes,int32_t *nonzpkeysp,int32_t height); |
|
|
|
arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t height,int32_t goalperc); |
|
|
|
int32_t FOUND_BLOCK,KOMODO_MAYBEMINED; |
|
|
|
extern int32_t KOMODO_LASTMINED; |
|
|
|
extern int32_t KOMODO_LASTMINED,KOMODO_INSYNC; |
|
|
|
int32_t roundrobin_delay; |
|
|
|
arith_uint256 HASHTarget,HASHTarget_POW; |
|
|
|
|
|
|
@ -725,7 +725,7 @@ void static BitcoinMiner() |
|
|
|
unsigned int n = chainparams.EquihashN(); |
|
|
|
unsigned int k = chainparams.EquihashK(); |
|
|
|
uint8_t *script; uint64_t total,checktoshis; int32_t i,j,gpucount=KOMODO_MAXGPUCOUNT,notaryid = -1; |
|
|
|
while ( (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) ) //chainActive.LastTip()->nHeight != 235300 &&
|
|
|
|
while ( (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) ) |
|
|
|
{ |
|
|
|
sleep(1); |
|
|
|
if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) |
|
|
@ -911,13 +911,11 @@ void static BitcoinMiner() |
|
|
|
} |
|
|
|
while (true) |
|
|
|
{ |
|
|
|
/*if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT ) // skips when it shouldnt
|
|
|
|
{ |
|
|
|
fprintf(stderr,"skip generating %s on-demand block, no tx avail\n",ASSETCHAINS_SYMBOL); |
|
|
|
sleep(10); |
|
|
|
break; |
|
|
|
}*/ |
|
|
|
//fprintf(stderr,"top of while\n");
|
|
|
|
if ( KOMODO_INSYNC == 0 ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"Mining when blockchain might not be in sync\n"); |
|
|
|
sleep(3); |
|
|
|
} |
|
|
|
// Hash state
|
|
|
|
KOMODO_CHOSEN_ONE = 0; |
|
|
|
crypto_generichash_blake2b_state state; |
|
|
|