From 74f9ccc57c47e8e6d73aa34d9eec510b9169a50b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 20 Mar 2016 14:59:39 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 12 ++++++++---- iguana/iguana777.h | 2 +- iguana/main.c | 9 ++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 88924912b..63e14e332 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -596,13 +596,17 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers, coin->mapflags = mapflags; if ( (coin->startPEND= juint(json,"startpend")) == 0 ) coin->startPEND = IGUANA_MAXPENDBUNDLES; - else if ( coin->startPEND > 128 ) - coin->startPEND = 128; + else if ( coin->startPEND > 1024 ) + coin->startPEND = 1024; + else if ( coin->startPEND < 2 ) + coin->startPEND = 2; coin->MAXBUNDLES = coin->startPEND; if ( (coin->endPEND= juint(json,"endpend")) == 0 ) coin->endPEND = IGUANA_MINPENDBUNDLES; - else if ( coin->endPEND > 128 ) - coin->endPEND = 128; + else if ( coin->endPEND > 1024 ) + coin->endPEND = 1024; + else if ( coin->endPEND < 2 ) + coin->endPEND = 2; coin->enableCACHE = juint(json,"cache"); coin->MAXMEM = juint(json,"RAM"); if ( coin->MAXMEM == 0 ) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index a6eb0ae17..729c2758f 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -37,7 +37,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t #define IGUANA_HEADPERCENTAGE 0. #define IGUANA_TAILPERCENTAGE 1.0 #define IGUANA_MAXPENDHDRS 1 -#define _IGUANA_MAXPENDING 3 +#define _IGUANA_MAXPENDING 64 #define IGUANA_MINPENDBUNDLES 2 #define IGUANA_MAXPENDBUNDLES 2 #define IGUANA_BUNDLELOOP 77 diff --git a/iguana/main.c b/iguana/main.c index df3a52f1a..7e19f49fd 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1162,7 +1162,14 @@ void iguana_main(void *arg) } #endif if ( arg != 0 ) - SuperNET_JSON(&MYINFO,cJSON_Parse(arg),0); + { + cJSON *argjson; + if ( (argjson= cJSON_Parse(arg)) != 0 ) + { + SuperNET_JSON(&MYINFO,argjson,0); + free_json(argjson); + } + } mainloop(&MYINFO); }