From 8914ff996c1583ab06bd189a8bf8d61d467b9bec Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Jun 2017 17:32:09 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 2 +- iguana/exchanges/LP_rpc.c | 2 +- iguana/exchanges/LP_transaction.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index d9a343110..f1815bcbf 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -323,7 +323,7 @@ cJSON *LP_autotrade(struct LP_utxoinfo *myutxo,char *base,double maxprice) printf("%f ",metric); if ( metric > 0.9 ) { - metric = Q[i].destsatoshis / metric * metric * metric; + metric = Q[i].destsatoshis * metric * metric * metric; printf("%f, ",metric); if ( metric > bestmetric ) { diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index ed3784b55..96096072d 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -160,7 +160,7 @@ int32_t LP_importaddress(char *symbol,char *address) double LP_getestimatedrate(char *symbol) { - char buf[512],*retstr; double rate = 200; struct iguana_info *coin = LP_coinfind(symbol); + char buf[512],*retstr; double rate = 20; struct iguana_info *coin = LP_coinfind(symbol); if ( coin != 0 ) { sprintf(buf,"[%d]",3); diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index 42ffb64d2..71d254fd0 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -705,6 +705,8 @@ int32_t basilisk_rawtx_gen(void *ctx,char *str,uint32_t swapstarted,uint8_t *pub if ( coin->estimatedrate == 0. ) coin->estimatedrate = LP_getestimatedrate(coin->symbol); newtxfee = coin->estimatedrate * len; + if ( newtxfee < 10000 ) + newtxfee = 10000; printf("txfee %.8f -> newtxfee %.8f\n",dstr(txfee),dstr(newtxfee)); } else break; }