From 55234beabcd65dd3ca352503511d07102c89c535 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 13 Sep 2017 21:48:27 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_socket.c | 2 +- iguana/exchanges/LP_utxos.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 1a73ac60c..658f1f0d0 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -623,7 +623,7 @@ void LP_dedicatedloop(void *arg) { if ( item->type == 0xffffffff ) { - printf("purge %s\n",((struct stritem *)item)->str); + printf("purge %s",((struct stritem *)item)->str); DL_DELETE(ep->pendingQ.list,item); free(item); } diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index c91ba0f53..7c6a7431a 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -817,7 +817,7 @@ int32_t LP_nearestvalue(int32_t iambob,uint64_t *values,int32_t n,uint64_t targe uint64_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 myprivkey,bits256 mypub) { - char *script; struct LP_utxoinfo *utxo; cJSON *array,*item; bits256 txid,deposittxid; int32_t used,i,n,cmpflag,iambob,vout,depositvout; uint64_t *values=0,satoshis,txfee,depositval,targetval,value,total = 0; + char *script; struct LP_utxoinfo *utxo; cJSON *array,*item; bits256 txid,deposittxid; int32_t used,i,n,cmpflag,iambob,vout,depositvout; uint64_t *values=0,satoshis,txfee,depositval,value,total = 0; int64_t targetval; if ( coin == 0 ) { printf("coin not active\n"); @@ -889,6 +889,8 @@ uint64_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypr if ( iambob == 0 ) targetval = (depositval / 776) + txfee; else targetval = (depositval / 9) * 8 - 2*txfee; + if ( targetval < txfee*2 ) + targetval = txfee*2 printf("iambob.%d i.%d deposit %.8f min %.8f target %.8f\n",iambob,i,dstr(depositval),dstr((1+LP_MINSIZE_TXFEEMULT)*txfee),dstr(targetval)); if ( depositval < (1+LP_MINSIZE_TXFEEMULT)*txfee ) continue;