From ca8cf5a09b97ca86dc531301cf2429e5de44ee97 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 6 Jul 2017 23:10:18 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_utxos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index a036fb6f6..09051fc3c 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -704,13 +704,13 @@ int32_t LP_maxvalue(uint64_t *values,int32_t n) return(maxi); } -int32_t LP_nearestvalue(uint64_t *values,int32_t n,uint64_t targetval) +int32_t LP_nearestvalue(int32_t iambob,uint64_t *values,int32_t n,uint64_t targetval) { int32_t i,mini = -1; int64_t dist; uint64_t mindist = (1 << 31); for (i=0; i= 0 && dist < mindist ) { @@ -767,9 +767,9 @@ uint64_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypr targetval = (depositval / 776) + 100000; else targetval = (depositval / 9) * 8 + 100000; //printf("i.%d %.8f target %.8f\n",i,dstr(depositval),dstr(targetval)); - if ( (i= LP_nearestvalue(values,n,targetval)) < 0 && iambob != 0 ) + if ( (i= LP_nearestvalue(iambob,values,n,targetval)) < 0 && iambob != 0 ) targetval /= 4; - if ( (i= LP_nearestvalue(values,n,targetval)) >= 0 ) + if ( (i= LP_nearestvalue(iambob,values,n,targetval)) >= 0 ) { item = jitem(array,i); txid = jbits256(item,"txid");