Browse Source

test

release/v0.1
jl777 8 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);
}
printf("helperid.%d start utxogen\n",helperid);
if ( (incr= IGUANA_NUMHELPERS) > 4 )
incr = 4;
if ( (incr= IGUANA_NUMHELPERS) > 8 )
incr = 8;
//if ( 1 || coin->PREFETCHLAG > 0 ) // data issues on slow systems
// incr = 1;
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)
{
static int32_t maxhelperid;
static uint64_t helperidbits;
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);
helperid %= 64;
if ( arg != 0 && (argjson= cJSON_Parse(arg)) != 0 )
helperid = juint(argjson,"helperid");
if ( helperid > maxhelperid )
maxhelperid = helperid;
if ( helperid < maxhelperid )
if ( ((1 << helperid) & helperidbits) != 0 )
{
printf("SKIP duplicate helper.%d\n",helperid);
return;
}
helperidbits |= (1 << helperid);
if ( IGUANA_NUMHELPERS < 2 )
type = 3;
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;
htmlstr[0] = 0;
pretty_forms(fname,agentstr,"html");
printf("autocreate %s\n","autoAPI.md");
//printf("autocreate %s\n","autoAPI.md");
pretty_forms("autoAPI.md",0,"md");
return(OS_filestr(&filesize,"index7778.html"));
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);
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,"rpcloop",iguana_rpcloop,myinfo,IGUANA_PERMTHREAD);

Loading…
Cancel
Save