From 26a24a079f848bd7ac8df7c5f153b4d6404be22d Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Feb 2018 17:06:15 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 7 ++----- iguana/exchanges/LP_utxo.c | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index b8eb2458f..cfeca9637 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -965,13 +965,10 @@ struct LP_quoteinfo *LP_trades_gotconnect(void *ctx,struct LP_quoteinfo *qp,stru qp = newqp; if ( (coin= LP_coinfind(qp->srccoin)) == 0 ) return(0); - printf("check myprice\n"); if ( (myprice= LP_trades_bobprice(&bid,&ask,qp)) == 0. ) return(0); - printf("validate myprice\n"); if ( (qprice= LP_trades_pricevalidate(qp,coin,myprice)) < 0. ) return(0); - printf("check reservation\n"); if ( LP_reservation_check(qp->txid,qp->vout,qp->desthash) == 0 && LP_reservation_check(qp->txid2,qp->vout2,qp->desthash) == 0 ) { printf("CONNECT STARTBOB!\n"); @@ -984,12 +981,12 @@ struct LP_quoteinfo *LP_trades_gotconnect(void *ctx,struct LP_quoteinfo *qp,stru struct LP_quoteinfo *LP_trades_gotconnected(void *ctx,struct LP_quoteinfo *qp,struct LP_quoteinfo *newqp,char *pairstr) { char *retstr; - //char str[65]; printf("alice %s received CONNECTED.(%llu)\n",bits256_str(str,G.LP_mypub25519),(long long)qp->aliceid); + char str[65]; printf("alice %s received CONNECTED.(%llu)\n",bits256_str(str,G.LP_mypub25519),(long long)qp->aliceid); *newqp = *qp; qp = newqp; if ( LP_trades_alicevalidate(ctx,qp) > 0. ) { - //printf("LP_trades_alicevalidate fine\n"); + printf("CONNECTED ALICE\n"); LP_aliceid(qp->tradeid,qp->aliceid,"connected",0,0); if ( (retstr= LP_connectedalice(qp,pairstr)) != 0 ) free(retstr); diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index 2ad25ecf9..e86bffe26 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/iguana/exchanges/LP_utxo.c @@ -112,7 +112,6 @@ struct LP_inuse_info *_LP_inuse_add(uint32_t expiration,bits256 otherpub,bits256 int32_t LP_reservation_check(bits256 txid,int32_t vout,bits256 pubkey) { struct LP_inuse_info *lp; int32_t retval = -1; - printf("LP_reservation check\n"); if ( bits256_nonz(pubkey) != 0 ) { char str[65],str2[65]; @@ -124,7 +123,7 @@ int32_t LP_reservation_check(bits256 txid,int32_t vout,bits256 pubkey) else printf("otherpub.%s != %s\n",bits256_str(str,lp->otherpub),bits256_str(str2,pubkey)); } else printf("couldnt find %s/v%d\n",bits256_str(str,txid),vout); portable_mutex_unlock(&LP_inusemutex); - } else printf("null pubkey\n"); + } else printf("LP_reservation_check null pubkey\n"); return(retval); }