Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
eff641b4be
  1. 5
      iguana/iguana_recv.c
  2. 2
      iguana/main.c

5
iguana/iguana_recv.c

@ -702,7 +702,9 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana
{ {
block->RO.txn_count = req->numtx; block->RO.txn_count = req->numtx;
//block->RO.recvlen = recvlen; //block->RO.recvlen = recvlen;
if ( req->copyflag != 0 && block->queued == 0 && bp != 0 ) if ( req->copyflag != 0 )
{
if ( block->queued == 0 && bp != 0 )
{ {
char str[65]; fprintf(stderr,"req.%p %s copyflag.%d %d data %d %d\n",req,bits256_str(str,block->RO.hash2),req->copyflag,block->height,req->recvlen,recvlen); char str[65]; fprintf(stderr,"req.%p %s copyflag.%d %d data %d %d\n",req,bits256_str(str,block->RO.hash2),req->copyflag,block->height,req->recvlen,recvlen);
coin->numcached++; coin->numcached++;
@ -727,6 +729,7 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana
} else printf("got origblock.%s to cache\n",bits256_str(str,origblock->RO.hash2)); } else printf("got origblock.%s to cache\n",bits256_str(str,origblock->RO.hash2));
} }
} }
}
//printf("datalen.%d ipbits.%x\n",datalen,req->ipbits); //printf("datalen.%d ipbits.%x\n",datalen,req->ipbits);
} else printf("cant create origblock.%p block.%p bp.%p bundlei.%d\n",origblock,block,bp,bundlei); } else printf("cant create origblock.%p block.%p bp.%p bundlei.%d\n",origblock,block,bp,bundlei);
return(req); return(req);

2
iguana/main.c

@ -1117,7 +1117,7 @@ void iguana_main(void *arg)
sleep(1); sleep(1);
char *str; char *str;
//iguana_launchcoin(MYINFO.rpcsymbol,cJSON_Parse("{}")); //iguana_launchcoin(MYINFO.rpcsymbol,cJSON_Parse("{}"));
if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":128,\"maxpeers\":64,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":1,\"poll\":1,\"startpend\":1024,\"endpend\":1024,\"cache\":1}"),0)) != 0 ) if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":128,\"maxpeers\":64,\"newcoin\":\"BTC\",\"active\":1,\"numhelpers\":1,\"poll\":1,\"startpend\":2,\"endpend\":2,\"cache\":0}"),0)) != 0 )
{ {
free(str); 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)) != 0 ) 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)) != 0 )

Loading…
Cancel
Save