Browse Source

Test

etomic
jl777 7 years ago
parent
commit
a3bc58c3e4
  1. 4
      iguana/exchanges/LP_rpc.c
  2. 2
      iguana/exchanges/LP_socket.c

4
iguana/exchanges/LP_rpc.c

@ -133,7 +133,7 @@ cJSON *bitcoin_json(struct iguana_info *coin,char *method,char *params)
else
{
retjson = electrum_submit(coin->symbol,coin->electrum,0,method,params,LP_HTTP_TIMEOUT);
printf("electrum %s.%s -> (%s)\n",method,params,jprint(retjson,0));
//printf("electrum %s.%s -> (%s)\n",method,params,jprint(retjson,0));
if ( (resultjson= jobj(retjson,"result")) != 0 )
{
resultjson = jduplicate(resultjson);
@ -361,7 +361,7 @@ double LP_getestimatedrate(struct iguana_info *coin)
char buf[512],*retstr,*result; cJSON *retjson = 0; double rate = 20;
if ( coin != 0 && (strcmp(coin->symbol,"BTC") == 0 || coin->txfee == 0) )
{
if ( coin->rate != 0. && time(NULL) > coin->ratetime+60 )
if ( coin->rate == 0. || time(NULL) > coin->ratetime+60 )
{
sprintf(buf,"[%d]",3);
if ( (retstr= LP_apicall(coin,"estimatefee",buf)) != 0 )

2
iguana/exchanges/LP_socket.c

@ -511,7 +511,7 @@ int32_t LP_recvfunc(struct electrum_info *ep,char *str,int32_t len)
if ( (strjson= cJSON_Parse(str)) != 0 )
{
resultjson = jobj(strjson,"result");
printf("result.(%s)\n",jprint(resultjson,0));
//printf("result.(%s)\n",jprint(resultjson,0));
if ( (method= jstr(strjson,"method")) != 0 )
{
if ( strcmp(method,"blockchain.headers.subscribe") == 0 )

Loading…
Cancel
Save