From 70958d015618149b0e2a06b05004823a94d8b429 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 12 Jan 2016 19:03:17 -0300 Subject: [PATCH] test --- iguana/iguana777.h | 2 +- iguana/iguana_msg.c | 2 +- iguana/iguana_peers.c | 4 ++-- iguana/iguana_recv.c | 6 +++--- iguana/main.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index a5c6de278..3a8e06244 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -33,7 +33,7 @@ #define _IGUANA_MAXBUNDLES 8 #define IGUANA_MAXACTIVEBUNDLES 32 #define IGUANA_MAXFILES 4096 -#define IGUANA_BUNDLELOOP 10 +#define IGUANA_BUNDLELOOP 1000 #define IGUANA_RPCPORT 7778 #define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16) diff --git a/iguana/iguana_msg.c b/iguana/iguana_msg.c index 9b8205619..3c893fb41 100755 --- a/iguana/iguana_msg.c +++ b/iguana/iguana_msg.c @@ -438,7 +438,7 @@ int32_t iguana_msgparser(struct iguana_info *coin,struct iguana_peer *addr,struc strcpy(addr->lastcommand,H->command); } retval = 0; - printf("iguana_msgparser %s parse.(%s)\n",addr->ipaddr,H->command); + //printf("iguana_msgparser %s parse.(%s)\n",addr->ipaddr,H->command); if ( strcmp(H->command,"SuperNET") == 0 ) { addr->supernet = 1; diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index d032c2a20..b59dce86a 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -471,7 +471,7 @@ void iguana_parsebuf(struct iguana_info *coin,struct iguana_peer *addr,struct ig if ( memcmp(&checkH,H,sizeof(checkH)) == 0 ) { //if ( strcmp(addr->ipaddr,"127.0.0.1") == 0 ) - printf("%s parse.(%s) len.%d\n",addr->ipaddr,H->command,len); + //printf("%s parse.(%s) len.%d\n",addr->ipaddr,H->command,len); //printf("addr->dead.%u\n",addr->dead); if ( strcmp(H->command,"block") == 0 || strcmp(H->command,"tx") == 0 ) { @@ -937,7 +937,7 @@ void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr) { if ( req->datalen != 0 ) { - char str[65]; printf("CACHE parse[%d] %s %s\n",req->recvlen,req->H.command,bits256_str(str,req->block.RO.hash2)); + //char str[65]; printf("CACHE parse[%d] %s %s\n",req->recvlen,req->H.command,bits256_str(str,req->block.RO.hash2)); iguana_parsebuf(coin,addr,&req->H,req->serialized,req->recvlen); } else printf("CACHE error no datalen\n"); coin->cachefreed++; diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 90f842732..e81eaabb2 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -154,7 +154,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i bp = 0, bundlei = -2; if ( copyflag != 0 && recvlen != 0 && ((bp= iguana_bundlefind(coin,&bp,&bundlei,origtxdata->block.RO.hash2)) == 0 || (bp->blocks[bundlei] != 0 && bp->blocks[bundlei]->fpipbits == 0)) ) { - printf("copy %p serialized[%d]\n",req->serialized,req->recvlen); + //printf("copy %p serialized[%d]\n",req->serialized,req->recvlen); memcpy(req->serialized,data,recvlen), req->copyflag = 1; } txdata = origtxdata; @@ -463,7 +463,7 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana struct iguana_bundle *prevbp=0,*bp=0; int32_t prevbundlei=-2,bundlei = -2; struct iguana_block *prevblock,*block; bp = iguana_bundleset(coin,&block,&bundlei,origblock); - static int total; char str[65]; printf("RECV %s [%d:%d] block.%08x | %d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block->fpipbits,total++); + //static int total; char str[65]; printf("RECV %s [%d:%d] block.%08x | %d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block->fpipbits,total++); iguana_bundlefind(coin,&prevbp,&prevbundlei,origblock->RO.prev_block); if ( prevbp != 0 && prevbundlei >= 0 && (prevblock= iguana_blockfind(coin,origblock->RO.prev_block)) != 0 ) { @@ -499,7 +499,7 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana block->RO.recvlen = recvlen; if ( req->copyflag != 0 && block->queued == 0 )//block->rawdata == 0 ) { - char str[65]; printf("%s copyflag.%d %d data %d %d\n",bits256_str(str,block->RO.hash2),req->copyflag,block->height,req->recvlen,recvlen); + //char str[65]; printf("%s copyflag.%d %d data %d %d\n",bits256_str(str,block->RO.hash2),req->copyflag,block->height,req->recvlen,recvlen); //block->rawdata = mycalloc('n',1,block->RO.recvlen); //memcpy(block->rawdata,req->serialized,block->RO.recvlen); //block->copyflag = 1; diff --git a/iguana/main.c b/iguana/main.c index 0394c5988..090192ecc 100644 --- a/iguana/main.c +++ b/iguana/main.c @@ -318,7 +318,7 @@ void iguana_main(void *arg) #ifdef __APPLE__ sleep(1); char *str; - if ( (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":0,\"maxpeers\":16,\"coin\":\"BTC\",\"active\":1}"),0)) != 0 ) + if ( (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":0,\"maxpeers\":64,\"coin\":\"BTCD\",\"active\":1}"),0)) != 0 ) { printf("got.(%s)\n",str); free(str);