Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
065f214fdb
  1. 2
      iguana/iguana_unspents.c
  2. 4
      iguana/main.c
  3. BIN
      iguana/tests/.jsoncmp.c.swp
  4. BIN
      iguana/tests/jsoncmp
  5. 3
      iguana/tests/jsoncmp.c

2
iguana/iguana_unspents.c

@ -2547,7 +2547,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
memset(ptr,0,sizeof(*bp->speculative)*bp->n);
myfree(ptr,(bp->n+1)*sizeof(*bp->speculative));
}
//iguana_RTramchainalloc("RTbundle",coin,bp);
iguana_RTramchainalloc("RTbundle",coin,bp);
}
return(flag);
}

4
iguana/main.c

@ -1171,7 +1171,7 @@ void iguana_commandline(struct supernet_info *myinfo,char *arg)
arg = "iguana.conf";
if ( arg != 0 )
{
if ( arg[0] == '"' && arg[1] == '{' )
if ( arg[1] == '{' || arg[1] == '[' )
argstr = arg;
else argstr = OS_filestr(&filesize,arg);
if ( (argjson= cJSON_Parse(argstr)) != 0 )
@ -1200,7 +1200,7 @@ void iguana_commandline(struct supernet_info *myinfo,char *arg)
free(str);
}
free_json(argjson);
} else printf("error parsing.(%s)\n",(char *)arg);
} else printf("error parsing.(%s)\n",(char *)argstr);
if ( argstr != arg )
free(argstr);
}

BIN
iguana/tests/.jsoncmp.c.swp

Binary file not shown.

BIN
iguana/tests/jsoncmp

Binary file not shown.

3
iguana/tests/jsoncmp.c

@ -9,6 +9,7 @@ int32_t main(int32_t argc,char **argv)
if ( argc > 2 && (argjson= cJSON_Parse(argv[2])) != 0 )
{
fname = argv[1];
printf("fname.%s\n",argv[1]);
if ( (filestr= OS_filestr(&filesize,fname)) != 0 )
{
if ( (filejson= cJSON_Parse(filestr)) != 0 )
@ -37,6 +38,6 @@ int32_t main(int32_t argc,char **argv)
}
free(filestr);
}
}
} else printf("argc.%d fname.(%s) error\n",argc,argv[1]);
}

Loading…
Cancel
Save