From c356f45b27ac9978a97ff393e93a46fab4e43ec8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 21 Sep 2017 12:57:44 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 3 ++- iguana/exchanges/LP_socket.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index a6fa028ea..b5b4bc9ae 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -706,6 +706,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, price = ask; autxo = &A; butxo = &B; + LP_abutxo_set(autxo,0,&Q); if ( strcmp(method,"request") == 0 ) { utxos = calloc(max,sizeof(*utxos)); @@ -721,7 +722,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, Q.vout = butxo->payment.vout; Q.txid2 = butxo->deposit.txid; Q.vout2 = butxo->deposit.vout; - LP_abutxo_set(autxo,butxo,&Q); + LP_abutxo_set(0,butxo,&Q); LP_butxo_swapfields(butxo); if ( (qprice= LP_quote_validate(autxo,butxo,&Q,1)) <= SMALLVAL ) { diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 28e7a582d..32747b63a 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -467,7 +467,7 @@ cJSON *electrum_address_getmempool(char *symbol,struct electrum_info *ep,cJSON * cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON **retjsonp,char *addr) { cJSON *retjson=0; struct iguana_info *coin = LP_coinfind(symbol); - printf("electrum.%s/%s listunspent last.(%s lag %d)\n",ep->symbol,coin->symbol,coin->lastunspent,(int32_t)(time(NULL) - coin->unspenttime)); + //printf("electrum.%s/%s listunspent last.(%s lag %d)\n",ep->symbol,coin->symbol,coin->lastunspent,(int32_t)(time(NULL) - coin->unspenttime)); if ( strcmp(coin->lastunspent,addr) != 0 || time(NULL) > coin->unspenttime+10 ) { if ( (retjson= electrum_strarg(symbol,ep,retjsonp,"blockchain.address.listunspent",addr,ELECTRUM_TIMEOUT)) != 0 )