Browse Source

Stats.log

etomic
jl777 7 years ago
parent
commit
ed53146c92
  1. 2
      iguana/exchanges/LP_prices.c
  2. 15
      iguana/exchanges/LP_remember.c

2
iguana/exchanges/LP_prices.c

@ -169,7 +169,7 @@ struct LP_address *_LP_addressadd(struct iguana_info *coin,char *coinaddr)
ap->pubkey = pubp->pubkey;
memcpy(ap->pubsecp,pubp->pubsecp,sizeof(ap->pubsecp));
}
printf("LP_ADDRESS %s ADD.(%s)\n",coin->symbol,coinaddr);
//printf("LP_ADDRESS %s ADD.(%s)\n",coin->symbol,coinaddr);
HASH_ADD_KEYPTR(hh,coin->addresses,ap->coinaddr,strlen(ap->coinaddr),ap);
return(ap);
}

15
iguana/exchanges/LP_remember.c

@ -1203,6 +1203,19 @@ char *basilisk_swapentry(uint32_t requestid,uint32_t quoteid)
void LP_tradecommand_log(cJSON *argjson)
{
static FILE *logfp; char *jsonstr;
if ( logfp == 0 )
{
if ( (logfp= fopen("stats.log","rb+")) != 0 )
fseek(logfp,0,SEEK_END);
else logfp = fopen("stats.log","wb");
}
if ( logfp != 0 )
{
jsonstr = jprint(argjson,0);
fprintf(logfp,"%s\n",jsonstr);
free(jsonstr);
fflush(logfp);
}
}

Loading…
Cancel
Save