From 4c763f559080e5d97df3b5c51045d5d727e0b1d1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 14 Sep 2017 19:18:54 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 4 ++-- iguana/exchanges/LP_utxos.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index b0a7bc083..52d4f418d 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -644,8 +644,8 @@ struct LP_utxoinfo *LP_bestutxo(double *ordermatchpricep,int64_t *bestsatoshisp, else { printf("ineligible.(%.8f %.8f)\n",price,dstr(butxo->S.satoshis)); - if ( butxo->T.spentflag == 0 ) - butxo->T.spentflag = (uint32_t)time(NULL); + //if ( butxo->T.spentflag == 0 ) + // butxo->T.spentflag = (uint32_t)time(NULL); } } else diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index 5ce06ba46..d0c778cd1 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -471,7 +471,7 @@ char *LP_spentcheck(cJSON *argjson) LP_mypeer->numutxos--; utxo->T.spentflag = (uint32_t)time(NULL); retval++; - //printf("indeed txid was spent\n"); + printf("indeed txid was spent\n"); } } } @@ -598,8 +598,8 @@ struct LP_utxoinfo *LP_utxoadd(int32_t iambob,int32_t mypubsock,char *symbol,bit char str[65],str2[65],str3[65],str4[65],str5[65],str6[65]; if ( utxo->T.spentflag != 0 || LP_txvalue(0,utxo->coin,utxo->payment.txid,utxo->payment.vout) < utxo->payment.value || LP_txvalue(0,utxo->coin,u.txid,u.vout) < u.value ) { - if ( utxo->T.spentflag == 0 ) - utxo->T.spentflag = (uint32_t)time(NULL); + //if ( utxo->T.spentflag == 0 ) + // utxo->T.spentflag = (uint32_t)time(NULL); printf("original utxo pair not valid\n"); if ( dispflag != 0 ) printf("error on subsequent utxo iambob.%d %.8f %.8f add.(%s %s) when.(%s %s) %d %d %d %d %d %d %d %d %d %d %d pubkeys.(%s vs %s)\n",iambob,dstr(val),dstr(val2),bits256_str(str,txid),bits256_str(str2,txid2),bits256_str(str3,utxo->payment.txid),bits256_str(str4,utxo->deposit.txid),bits256_cmp(txid,utxo->payment.txid) != 0,bits256_cmp(txid2,u.txid) != 0,vout != utxo->payment.vout,tmpsatoshis != utxo->S.satoshis,vout2 != u.vout,value2 != u.value,strcmp(symbol,utxo->coin) != 0,strcmp(spendscript,utxo->spendscript) != 0,strcmp(coinaddr,utxo->coinaddr) != 0,bits256_cmp(pubkey,utxo->pubkey) != 0,value != utxo->payment.value,bits256_str(str5,pubkey),bits256_str(str6,utxo->pubkey));