Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
0cbf6c5c05
  1. 12
      iguana/iguana777.c
  2. 2
      iguana/iguana_json.c
  3. 2
      iguana/main.c

12
iguana/iguana777.c

@ -459,8 +459,8 @@ int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int
return(0); return(0);
} }
printf("helperid.%d start utxogen\n",helperid); printf("helperid.%d start utxogen\n",helperid);
if ( (incr= IGUANA_NUMHELPERS) > 4 ) if ( (incr= IGUANA_NUMHELPERS) > 8 )
incr = 4; incr = 8;
//if ( 1 || coin->PREFETCHLAG > 0 ) // data issues on slow systems //if ( 1 || coin->PREFETCHLAG > 0 ) // data issues on slow systems
// incr = 1; // incr = 1;
max = coin->bundlescount; max = coin->bundlescount;
@ -538,18 +538,18 @@ int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int
void iguana_helper(void *arg) void iguana_helper(void *arg)
{ {
static int32_t maxhelperid; static uint64_t helperidbits;
cJSON *argjson=0; int32_t iter,n,j,polltimeout,type,helperid=rand(),flag,allcurrent,idle=0; cJSON *argjson=0; int32_t iter,n,j,polltimeout,type,helperid=rand(),flag,allcurrent,idle=0;
struct iguana_helper *ptr; struct iguana_info *coin,*tmp; struct OS_memspace MEM,*MEMB; struct iguana_bundle *bp; struct supernet_info *myinfo = SuperNET_MYINFO(0); struct iguana_helper *ptr; struct iguana_info *coin,*tmp; struct OS_memspace MEM,*MEMB; struct iguana_bundle *bp; struct supernet_info *myinfo = SuperNET_MYINFO(0);
helperid %= 64;
if ( arg != 0 && (argjson= cJSON_Parse(arg)) != 0 ) if ( arg != 0 && (argjson= cJSON_Parse(arg)) != 0 )
helperid = juint(argjson,"helperid"); helperid = juint(argjson,"helperid");
if ( helperid > maxhelperid ) if ( ((1 << helperid) & helperidbits) != 0 )
maxhelperid = helperid;
if ( helperid < maxhelperid )
{ {
printf("SKIP duplicate helper.%d\n",helperid); printf("SKIP duplicate helper.%d\n",helperid);
return; return;
} }
helperidbits |= (1 << helperid);
if ( IGUANA_NUMHELPERS < 2 ) if ( IGUANA_NUMHELPERS < 2 )
type = 3; type = 3;
else type = (1 << (helperid % 2)); else type = (1 << (helperid % 2));

2
iguana/iguana_json.c

@ -480,7 +480,7 @@ char *SuperNET_htmlstr(char *fname,char *htmlstr,int32_t maxsize,char *agentstr)
int32_t i,n,len,size = 0; long filesize; cJSON *helpjson,*item,*array; char *str; FILE *fp = 0; int32_t i,n,len,size = 0; long filesize; cJSON *helpjson,*item,*array; char *str; FILE *fp = 0;
htmlstr[0] = 0; htmlstr[0] = 0;
pretty_forms(fname,agentstr,"html"); pretty_forms(fname,agentstr,"html");
printf("autocreate %s\n","autoAPI.md"); //printf("autocreate %s\n","autoAPI.md");
pretty_forms("autoAPI.md",0,"md"); pretty_forms("autoAPI.md",0,"md");
return(OS_filestr(&filesize,"index7778.html")); return(OS_filestr(&filesize,"index7778.html"));
sprintf(htmlstr,"<!DOCTYPE HTML><html> <head><title>SuperUGLY GUI></title></head> <body> "); sprintf(htmlstr,"<!DOCTYPE HTML><html> <head><title>SuperUGLY GUI></title></head> <body> ");

2
iguana/main.c

@ -701,7 +701,7 @@ void iguana_launchdaemons(struct supernet_info *myinfo)
{ {
sprintf(helperstr,"{\"helperid\":%d}",i); sprintf(helperstr,"{\"helperid\":%d}",i);
helperargs = clonestr(helperstr); helperargs = clonestr(helperstr);
printf("launch[%d] of %d (%s)\n",i,IGUANA_NUMHELPERS,helperstr); printf("helper launch[%d] of %d (%s)\n",i,IGUANA_NUMHELPERS,helperstr);
iguana_launch(0,"iguana_helper",iguana_helper,helperargs,IGUANA_PERMTHREAD); iguana_launch(0,"iguana_helper",iguana_helper,helperargs,IGUANA_PERMTHREAD);
} }
iguana_launch(0,"rpcloop",iguana_rpcloop,myinfo,IGUANA_PERMTHREAD); iguana_launch(0,"rpcloop",iguana_rpcloop,myinfo,IGUANA_PERMTHREAD);

Loading…
Cancel
Save