From eef5a1a73a93d3cb4ae6694b92f5c5ab41f9969f Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 26 Sep 2017 17:06:23 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index ba5f5ec7d..dea7a0c75 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -304,6 +304,10 @@ double LP_quote_validate(struct LP_utxoinfo *autxo,struct LP_utxoinfo *butxo,str if ( qp->satoshis != 0 ) qprice = ((double)qp->destsatoshis / qp->satoshis); LP_txfees(&txfee,&desttxfee,qp->srccoin,qp->destcoin); + if ( txfee < qp->txfee ) + qp->txfee = txfee; + if ( desttxfee < qp->desttxfee ) + qp->desttxfee = desttxfee; printf("qprice %.8f <- %.8f/%.8f txfees.(%.8f %.8f) vs (%.8f %.8f)\n",qprice,dstr(qp->destsatoshis),dstr(qp->satoshis),dstr(qp->txfee),dstr(qp->desttxfee),dstr(txfee),dstr(desttxfee)); if ( qp->txfee < LP_REQUIRED_TXFEE*txfee || qp->desttxfee < LP_REQUIRED_TXFEE*desttxfee ) return(-14);