Browse Source

Test

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

4
iguana/exchanges/LP_rpc.c

@ -111,7 +111,7 @@ char *LP_apicall(struct iguana_info *coin,char *method,char *params)
{
if ( (retjson= electrum_submit(coin->symbol,coin->electrum,&retjson,method,params,ELECTRUM_TIMEOUT)) != 0 )
{
retstr = jprint(retjson,0);
retstr = jprint(retjson,1);
//printf("got.%p (%s)\n",retjson,retstr);
return(retstr);
} return(clonestr("{\"error\":\"electrum no response\"}"));
@ -808,6 +808,8 @@ double _LP_getestimatedrate(struct iguana_info *coin)
sprintf(buf,"[%d]",strcmp(coin->symbol,"BTC") == 0 ? 6 : 2);
if ( (retstr= LP_apicall(coin,coin->electrum==0?"estimatefee" : "blockchain.estimatefee",buf)) != 0 )
{
if ( coin->electrum != 0 )
printf("estimatefee.(%s)\n",retstr);
if ( retstr[0] == '{' && (errjson= cJSON_Parse(retstr)) != 0 )
{
if ( jobj(errjson,"error") != 0 )

1
iguana/exchanges/LP_socket.c

@ -592,6 +592,7 @@ cJSON *electrum_addpeer(char *symbol,struct electrum_info *ep,cJSON **retjsonp,c
cJSON *electrum_sendrawtransaction(char *symbol,struct electrum_info *ep,cJSON **retjsonp,char *rawtx) { return(electrum_strarg(symbol,ep,retjsonp,"blockchain.transaction.broadcast",rawtx,ELECTRUM_TIMEOUT)); }
cJSON *electrum_estimatefee(char *symbol,struct electrum_info *ep,cJSON **retjsonp,int32_t numblocks) { return(electrum_intarg(symbol,ep,retjsonp,"blockchain.estimatefee",numblocks,ELECTRUM_TIMEOUT)); }
cJSON *electrum_getchunk(char *symbol,struct electrum_info *ep,cJSON **retjsonp,int32_t n) { return(electrum_intarg(symbol,ep,retjsonp,"blockchain.block.get_chunk",n,ELECTRUM_TIMEOUT)); }
cJSON *electrum_getheader(char *symbol,struct electrum_info *ep,cJSON **retjsonp,int32_t n)

Loading…
Cancel
Save