Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
2b67c2df67
  1. 4
      iguana/iguana_bundles.c
  2. 6
      iguana/iguana_unspents.c
  3. 2
      iguana/main.c

4
iguana/iguana_bundles.c

@ -503,7 +503,7 @@ struct iguana_block *iguana_bundleblock(struct iguana_info *coin,bits256 *hash2p
int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle *bp,int32_t priority,double mult)
{
int32_t i,max,nonz,lasti,firsti,lag,num,n=0; uint32_t now; bits256 hash2; double aveduration; struct iguana_peer *addr;
if ( bp->emitfinish != 0 || (priority == 0 && time(NULL) < bp->missingstime+30) )
if ( bp->emitfinish != 0 || (priority > 0 && time(NULL) < bp->missingstime+3) || time(NULL) < bp->missingstime+30 )
return(0);
bp->missingstime = (uint32_t)time(NULL);
if ( bp->durationscount != 0 )
@ -1123,7 +1123,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag)
//printf("NONZ stucktime.%u lag.%d iters.%d vs %d metric.%d\n",coin->stucktime,lag,coin->stuckiters,lag/coin->MAXSTUCKTIME,smetric);
if ( (lag/coin->MAXSTUCKTIME) > coin->stuckiters )
{
printf("UNSTICK\n");
//printf("UNSTICK\n");
iguana_unstickhdr(coin,bp,6);
coin->stuckiters = (int32_t)(lag/coin->MAXSTUCKTIME);
if ( coin->stuckiters > 2 )

6
iguana/iguana_unspents.c

@ -399,7 +399,7 @@ int32_t iguana_alloctxbits(struct iguana_info *coin,struct iguana_ramchain *ramc
ramchain->txbits = calloc(1,tlen);
memcpy(ramchain->txbits,TXbits,tlen);
total += tlen;
char str[65]; printf("alloc.[%d] txbits.%p[%d] total %s\n",ramchain->H.data->height/coin->chain->bundlesize,ramchain->txbits,tlen,mbstr(str,total));
//char str[65]; printf("alloc.[%d] txbits.%p[%d] total %s\n",ramchain->H.data->height/coin->chain->bundlesize,ramchain->txbits,tlen,mbstr(str,total));
return(tlen);
}
return(-1);
@ -1840,8 +1840,8 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
B = (void *)(long)((long)rdata + rdata->Boffset);
bundlei = (coin->RTheight % coin->chain->bundlesize);
block = iguana_bundleblock(coin,&hash2,bp,bundlei);
if ( bits256_nonz(hash2) != 0 )
iguana_blockhashset("RTset",coin,bp->bundleheight+bundlei,hash2,1);
//if ( bits256_nonz(hash2) != 0 )
// iguana_blockhashset("RTset",coin,bp->bundleheight+bundlei,hash2,1);
//printf("RT.%d vs hwm.%d starti.%d bp->n %d block.%p/%p ramchain.%p\n",coin->RTheight,coin->blocks.hwmchain.height,coin->RTstarti,bp->n,block,bp->blocks[bundlei],dest->H.data);
if ( block != 0 && bits256_nonz(block->RO.prev_block) != 0 )
{

2
iguana/main.c

@ -1197,7 +1197,7 @@ void iguana_main(void *arg)
if ( 1 )
{
sleep(1);
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"VALIDATE\":1,\"prefetchlag\":13,\"startpend\":2048,\"endpend\":2048,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":0,\"maxpeers\":64,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":8,\"poll\":10}"),0,myinfo->rpcport)) != 0 )
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"VALIDATE\":1,\"prefetchlag\":13,\"startpend\":2048,\"endpend\":2048,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":1,\"maxpeers\":64,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":8,\"poll\":10}"),0,myinfo->rpcport)) != 0 )
{
free(str);
if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":1024,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1}"),0,myinfo->rpcport)) != 0 )

Loading…
Cancel
Save