jl777 7 years ago
parent
commit
c0a58249c6
  1. 2
      iguana/exchanges/LP_stats.c
  2. 4
      iguana/exchanges/LP_transaction.c
  3. 6
      iguana/exchanges/stats.c

2
iguana/exchanges/LP_stats.c

@ -727,7 +727,7 @@ int32_t LP_stats_dispiter(cJSON *array,struct LP_swapstats *sp,uint32_t starttim
cJSON *LP_statslog_disp(uint32_t starttime,uint32_t endtime,char *refgui,bits256 refpubkey,char *refbase,char *refrel)
{
static int32_t rval;
cJSON *retjson,*array,*item,*reqjson; struct LP_pubkey_info *pubp,*ptmp; bits256 zero; uint32_t now; struct LP_swapstats *sp,*tmp; int32_t i,n,numtrades[LP_MAXPRICEINFOS]; uint64_t basevols[LP_MAXPRICEINFOS],relvols[LP_MAXPRICEINFOS];
cJSON *retjson,*array,*item; struct LP_pubkey_info *pubp,*ptmp; uint32_t now; struct LP_swapstats *sp,*tmp; int32_t i,n,numtrades[LP_MAXPRICEINFOS]; uint64_t basevols[LP_MAXPRICEINFOS],relvols[LP_MAXPRICEINFOS];
if ( rval == 0 )
rval = (LP_rand() % 300) + 60;
if ( starttime > endtime )

4
iguana/exchanges/LP_transaction.c

@ -1845,7 +1845,7 @@ int32_t basilisk_swapuserdata(uint8_t *userdata,bits256 privkey,int32_t ifpath,b
int32_t basilisk_bobpayment_reclaim(struct basilisk_swap *swap,int32_t delay)
{
static bits256 zero;
uint8_t userdata[512]; int32_t retval,i,len = 0; struct iguana_info *coin;
uint8_t userdata[512]; int32_t retval,len = 0; struct iguana_info *coin;
if ( (coin= LP_coinfind(swap->I.bobstr)) != 0 )
{
//printf("basilisk_bobpayment_reclaim\n");
@ -2031,7 +2031,7 @@ void basilisk_alicepayment(struct basilisk_swap *swap,struct iguana_info *coin,s
int32_t basilisk_alicetxs(int32_t pairsock,struct basilisk_swap *swap,uint8_t *data,int32_t maxlen)
{
char coinaddr[64]; int32_t i,retval = -1; struct iguana_info *coin;
char coinaddr[64]; int32_t retval = -1; struct iguana_info *coin;
if ( (coin= LP_coinfind(swap->I.alicestr)) != 0 )
{
if ( swap->alicepayment.I.datalen == 0 )

6
iguana/exchanges/stats.c

@ -512,7 +512,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
}
if ( is_cJSON_Array(argjson) != 0 && (n= cJSON_GetArraySize(argjson)) > 0 )
{
char *buf; cJSON *retitem,*retarray = cJSON_CreateArray();
cJSON *retitem,*retarray = cJSON_CreateArray();
origargjson = argjson;
symbol[0] = 0;
for (i=0; i<n; i++)
@ -529,7 +529,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
//free(buf);
//while ( retstr == 0 )
// usleep(10000);
if ( (retstr= stats_JSON(ctx,myipaddr,-1,argjson,remoteaddr,port)) != 0 )
if ( (retstr= stats_JSON(ctx,"127.0.0.1",-1,argjson,remoteaddr,port)) != 0 )
{
if ( (retitem= cJSON_Parse(retstr)) != 0 )
jaddi(retarray,retitem);
@ -556,7 +556,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
}
else
{
cJSON *arg; char *buf;
cJSON *arg; //char *buf;
if ( jstr(argjson,"agent") != 0 && strcmp(jstr(argjson,"agent"),"bitcoinrpc") != 0 && jobj(argjson,"params") != 0 )
{
arg = jobj(argjson,"params");

Loading…
Cancel
Save