|
@ -1118,6 +1118,7 @@ int32_t iguana_reqblocks(struct iguana_info *coin) |
|
|
{ |
|
|
{ |
|
|
double threshold,lag = OS_milliseconds() - coin->backstopmillis; |
|
|
double threshold,lag = OS_milliseconds() - coin->backstopmillis; |
|
|
bp = coin->bundles[(coin->blocks.hwmchain.height+1)/coin->chain->bundlesize]; |
|
|
bp = coin->bundles[(coin->blocks.hwmchain.height+1)/coin->chain->bundlesize]; |
|
|
|
|
|
threshold = 1000; |
|
|
if ( bp != 0 && bp->durationscount != 0 ) |
|
|
if ( bp != 0 && bp->durationscount != 0 ) |
|
|
threshold = (double)bp->totaldurations / bp->durationscount; |
|
|
threshold = (double)bp->totaldurations / bp->durationscount; |
|
|
else |
|
|
else |
|
@ -1157,7 +1158,7 @@ int32_t iguana_reqblocks(struct iguana_info *coin) |
|
|
flag++; |
|
|
flag++; |
|
|
char str[65]; |
|
|
char str[65]; |
|
|
if ( 1 && (rand() % 10000) == 0 )//|| bp->bundleheight > coin->longestchain-coin->chain->bundlesize )
|
|
|
if ( 1 && (rand() % 10000) == 0 )//|| bp->bundleheight > coin->longestchain-coin->chain->bundlesize )
|
|
|
printf("%s %s MAIN.%d t %.3flag %.3f\n",coin->symbol,bits256_str(str,hash2),coin->blocks.hwmchain.height+1,threshold,lag); |
|
|
printf("%s %s MAIN.%d t %.3f lag %.3f\n",coin->symbol,bits256_str(str,hash2),coin->blocks.hwmchain.height+1,threshold,lag); |
|
|
} |
|
|
} |
|
|
if ( 0 && bp != 0 && bundlei < bp->n-1 && (bits256_nonz(bp->hashes[bundlei+1]) != 0 || (bp->speculative != 0 && bits256_nonz(bp->speculative[bundlei+1]) != 0)) ) |
|
|
if ( 0 && bp != 0 && bundlei < bp->n-1 && (bits256_nonz(bp->hashes[bundlei+1]) != 0 || (bp->speculative != 0 && bits256_nonz(bp->speculative[bundlei+1]) != 0)) ) |
|
|
{ |
|
|
{ |
|
@ -1496,7 +1497,7 @@ int32_t iguana_processrecv(struct iguana_info *coin) // single threaded |
|
|
iguana_bundlestats(coin,str,IGUANA_DEFAULTLAG); |
|
|
iguana_bundlestats(coin,str,IGUANA_DEFAULTLAG); |
|
|
} |
|
|
} |
|
|
//printf("call _iguana_chainlink\n");
|
|
|
//printf("call _iguana_chainlink\n");
|
|
|
for (i=coin->blocks.hwmchain.height%coin->chain->bundlesize; i<coin->chain->bundlesize; i++) |
|
|
/*for (i=coin->blocks.hwmchain.height%coin->chain->bundlesize; i<coin->chain->bundlesize; i++)
|
|
|
{ |
|
|
{ |
|
|
if ( (bp= coin->current) != 0 && (block= bp->blocks[i]) != 0 ) |
|
|
if ( (bp= coin->current) != 0 && (block= bp->blocks[i]) != 0 ) |
|
|
{ |
|
|
{ |
|
@ -1505,7 +1506,7 @@ int32_t iguana_processrecv(struct iguana_info *coin) // single threaded |
|
|
iguana_blockQ("mainchain",coin,bp,-i,block->RO.hash2,1); |
|
|
iguana_blockQ("mainchain",coin,bp,-i,block->RO.hash2,1); |
|
|
//iguana_realtime_update(coin);
|
|
|
//iguana_realtime_update(coin);
|
|
|
} |
|
|
} |
|
|
} |
|
|
}*/ |
|
|
for (i=0; i<coin->chain->bundlesize; i++) |
|
|
for (i=0; i<coin->chain->bundlesize; i++) |
|
|
{ |
|
|
{ |
|
|
if ( iguana_realtime_update(coin) <= 0 ) |
|
|
if ( iguana_realtime_update(coin) <= 0 ) |
|
|