From 2e9793f6ba61e9b14e91146fa0b42a81bcaa5d81 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 3 Dec 2017 16:22:13 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_instantdex.c | 4 ++-- iguana/exchanges/LP_ordermatch.c | 1 - iguana/exchanges/LP_stats.c | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_instantdex.c b/iguana/exchanges/LP_instantdex.c index b32297672..62fafbbad 100644 --- a/iguana/exchanges/LP_instantdex.c +++ b/iguana/exchanges/LP_instantdex.c @@ -463,12 +463,12 @@ cJSON *LP_swapstats_item(struct LP_swapstats *sp,int32_t iambob) if ( sp->bobneeds_dPoW != 0 ) { jaddnum(item,"bobneeds_dPoW",sp->bobneeds_dPoW); - jaddnum(item,"bobdPoW_height",sp->bob_dPoWheight); + jaddnum(item,"bob_dPoWheight",sp->bob_dPoWheight); } if ( sp->aliceneeds_dPoW != 0 ) { jaddnum(item,"aliceneeds_dPoW",sp->aliceneeds_dPoW); - jaddnum(item,"alicedPoW_height",sp->alice_dPoWheight); + jaddnum(item,"alice_dPoWheight",sp->alice_dPoWheight); } } return(item); diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index cebdfd947..fa911b330 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1313,7 +1313,6 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel memset(&A,0,sizeof(A)); LP_address_utxo_reset(relcoin); if ( (autxo= LP_address_myutxopair(&A,0,utxos,max,relcoin,relcoin->smartaddr,txfee,dstr(destsatoshis),maxprice,desttxfee)) == 0 ) - //if ( (autxo= LP_utxo_bestfit(rel,destsatoshis + 2*desttxfee)) == 0 ) return(clonestr("{\"error\":\"cant find alice utxo that is close enough in size\"}")); //printf("bestfit selected alice (%.8f %.8f) for %.8f sats %.8f\n",dstr(autxo->payment.value),dstr(autxo->fee.value),dstr(destsatoshis),dstr(autxo->swap_satoshis)); if ( destsatoshis - desttxfee < autxo->swap_satoshis ) diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index 1837fbffd..3d3e72981 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -211,7 +211,8 @@ int32_t LP_swapstats_update(struct LP_swapstats *sp,struct LP_quoteinfo *qp,cJSO int32_t LP_dPoWheight(struct iguana_info *coin) // get dPoW protected height { int32_t notarized; - coin->height = LP_getheight(¬arized,coin); + LP_getheight(¬arized,coin); + printf("dPoWheight.%s %d\n",coin->symbol,notarized); return(notarized); }