Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
74f9ccc57c
  1. 12
      iguana/iguana777.c
  2. 2
      iguana/iguana777.h
  3. 9
      iguana/main.c

12
iguana/iguana777.c

@ -596,13 +596,17 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
coin->mapflags = mapflags; coin->mapflags = mapflags;
if ( (coin->startPEND= juint(json,"startpend")) == 0 ) if ( (coin->startPEND= juint(json,"startpend")) == 0 )
coin->startPEND = IGUANA_MAXPENDBUNDLES; coin->startPEND = IGUANA_MAXPENDBUNDLES;
else if ( coin->startPEND > 128 ) else if ( coin->startPEND > 1024 )
coin->startPEND = 128; coin->startPEND = 1024;
else if ( coin->startPEND < 2 )
coin->startPEND = 2;
coin->MAXBUNDLES = coin->startPEND; coin->MAXBUNDLES = coin->startPEND;
if ( (coin->endPEND= juint(json,"endpend")) == 0 ) if ( (coin->endPEND= juint(json,"endpend")) == 0 )
coin->endPEND = IGUANA_MINPENDBUNDLES; coin->endPEND = IGUANA_MINPENDBUNDLES;
else if ( coin->endPEND > 128 ) else if ( coin->endPEND > 1024 )
coin->endPEND = 128; coin->endPEND = 1024;
else if ( coin->endPEND < 2 )
coin->endPEND = 2;
coin->enableCACHE = juint(json,"cache"); coin->enableCACHE = juint(json,"cache");
coin->MAXMEM = juint(json,"RAM"); coin->MAXMEM = juint(json,"RAM");
if ( coin->MAXMEM == 0 ) if ( coin->MAXMEM == 0 )

2
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_HEADPERCENTAGE 0.
#define IGUANA_TAILPERCENTAGE 1.0 #define IGUANA_TAILPERCENTAGE 1.0
#define IGUANA_MAXPENDHDRS 1 #define IGUANA_MAXPENDHDRS 1
#define _IGUANA_MAXPENDING 3 #define _IGUANA_MAXPENDING 64
#define IGUANA_MINPENDBUNDLES 2 #define IGUANA_MINPENDBUNDLES 2
#define IGUANA_MAXPENDBUNDLES 2 #define IGUANA_MAXPENDBUNDLES 2
#define IGUANA_BUNDLELOOP 77 #define IGUANA_BUNDLELOOP 77

9
iguana/main.c

@ -1162,7 +1162,14 @@ void iguana_main(void *arg)
} }
#endif #endif
if ( arg != 0 ) 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); mainloop(&MYINFO);
} }

Loading…
Cancel
Save