From 013d030f2274e1e0766381bd1f2206f296bb84e9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 24 Nov 2017 23:55:10 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_socket.c | 4 ++++ iguana/exchanges/LP_utxo.c | 1 + 2 files changed, 5 insertions(+) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 7d1762e96..3009ff206 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -401,6 +401,8 @@ int32_t electrum_kickstart(struct electrum_info *ep) return(0); } +int32_t zeroval(); + cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,char *method,char *params,int32_t timeout) { // queue id and string and callback @@ -418,6 +420,8 @@ cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,ch *retjsonp = 0; sprintf(stratumreq,"{ \"jsonrpc\":\"2.0\", \"id\": %u, \"method\":\"%s\", \"params\": %s }\n",ep->stratumid,method,params); printf("%s %s",symbol,stratumreq); + if ( strcmp(params,"[\"KMD\"]") == 0 ) + printf("div0 %d\n",1/zeroval()); memset(ep->buf,0,ep->bufsize); sitem = electrum_sitem(ep,stratumreq,timeout,retjsonp); portable_mutex_lock(&ep->mutex); // this helps performance! diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index 93eca3034..bd271ffde 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/iguana/exchanges/LP_utxo.c @@ -427,6 +427,7 @@ struct LP_address *LP_address_utxo_reset(struct iguana_info *coin) { struct LP_address *ap; struct LP_address_utxo *up,*tmp; int32_t i,n,m,vout,height; cJSON *array,*item,*txobj; int64_t value; bits256 txid; uint32_t now; LP_address(coin,coin->smartaddr); + printf("call listunspent issue %s (%s)\n",coin->symbol,coin->smartaddr); LP_listunspent_issue(coin->symbol,coin->smartaddr,2); if ( (ap= LP_addressfind(coin,coin->smartaddr)) == 0 ) {