From b0e3393747035804813f5877c7e4fa02ec6f4e63 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 28 Sep 2017 19:52:06 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 0fde80a5c..5f443beaf 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -670,6 +670,16 @@ char *LP_connectedalice(cJSON *argjson) // alice autxo = &A; butxo = &B; LP_abutxo_set(autxo,butxo,&Q); + if ( (autxo= LP_utxopairfind(0,Q.txid,Q.vout,Q.txid2,Q.vout2)) == 0 ) + { + printf("cant find autxo in quote\n"); + return(clonestr("{\"error\":\"quote autxo find error\"}")); + } + if ( autxo->S.swap != 0 ) + { + printf("swap already pending\n"); + return(clonestr("{\"error\":\"swap already pending\"}")); + } if ( (qprice= LP_quote_validate(autxo,butxo,&Q,0)) <= SMALLVAL ) { LP_availableset(autxo);