From 2af509d711cd7845007a446f23a8d930284d2aa2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 21 Sep 2017 23:53:17 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_network.c | 2 +- iguana/exchanges/LP_ordermatch.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 55fffe825..02905f29a 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -87,7 +87,7 @@ void _LP_sendqueueadd(uint32_t crc32,int32_t sock,uint8_t *msg,int32_t msglen,in int32_t LP_crc32find(int32_t *duplicatep,int32_t ind,uint32_t crc32) { - static uint32_t crcs[16]; static unsigned long dup,total; + static uint32_t crcs[256]; static unsigned long dup,total; int32_t i; *duplicatep = 0; if ( ind < 0 ) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index ac76c941d..aee95fbe9 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -540,9 +540,9 @@ struct LP_utxoinfo *LP_butxo_add(struct LP_utxoinfo *butxo) void LP_butxo_swapfields_copy(struct LP_utxoinfo *destutxo,struct LP_utxoinfo *srcutxo) { - printf("LP_butxo_swapfields_copy\n"); + printf("LP_butxo_swapfields_copy %u <- %u\n",destutxo->T.swappending,srcutxo->T.swappending); destutxo->S = srcutxo->S; - destutxo->T.swappending = srcutxo->T.swappending; + destutxo->T = srcutxo->T; } void LP_butxo_swapfields(struct LP_utxoinfo *butxo) @@ -740,6 +740,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, autxo = &A; butxo = &B; LP_abutxo_set(autxo,butxo,&Q); + LP_butxo_swapfields(butxo); if ( strcmp(method,"request") == 0 ) { if ( (qprice= LP_quote_validate(autxo,butxo,&Q,1)) <= SMALLVAL ) @@ -755,7 +756,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, else { n = LP_listunspent_issue(coin->symbol,Q.coinaddr); - printf("need to verify\n"); + //printf("need to verify\n"); } butxo = LP_address_utxopair(butxo,utxos,max,LP_coinfind(Q.srccoin),Q.coinaddr,Q.txfee,dstr(Q.destsatoshis),price,1,Q.desttxfee); Q.txid = butxo->payment.txid;