diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 2bdb4f807..15175e95f 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/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 ) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 16da1a0c3..8907be909 100644 --- a/iguana/exchanges/LP_socket.c +++ b/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)