diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index 958583fec..232a88fd3 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -785,7 +785,7 @@ int32_t LP_nearestvalue(int32_t iambob,uint64_t *values,int32_t n,uint64_t targe dist = (values[i] - targetval); if ( iambob != 0 && dist < 0 && -dist < values[i]/10 ) dist = -dist; - printf("(%.8f %.8f).%d",dstr(dist),dstr(mindist),mini); + //printf("(%.8f %.8f).%d",dstr(dist),dstr(mindist),mini); if ( dist >= 0 && dist < mindist ) { mini = i; @@ -847,10 +847,13 @@ uint64_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypr targetval = (depositval / 9) * 8 + 100000; } printf("iambob.%d i.%d %.8f target %.8f\n",iambob,i,dstr(depositval),dstr(targetval)); - if ( (i= LP_nearestvalue(iambob,values,n,targetval)) < 0 && iambob != 0 ) - targetval /= 4; - if ( iambob != 0 && targetval < txfee*LP_MINSIZE_TXFEEMULT ) - continue; + if ( iambob != 0 ) + { + if ( (i= LP_nearestvalue(iambob,values,n,targetval)) < 0 ) + targetval /= 4; + if ( targetval < txfee*LP_MINSIZE_TXFEEMULT ) + continue; + } if ( (i= LP_nearestvalue(iambob,values,n,targetval)) >= 0 ) { item = jitem(array,i); @@ -875,7 +878,7 @@ uint64_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypr } portable_mutex_unlock(&LP_UTXOmutex); total += value; - } + } else printf("scriptmismatch.(%s) vs %s\n",script,jprint(item,0)); } } else break; }