From 716248d1144bae43b625cbae961da2fec7d831a1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 7 Dec 2017 20:38:35 +0400 Subject: [PATCH 1/3] Test --- iguana/exchanges/LP_instantdex.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_instantdex.c b/iguana/exchanges/LP_instantdex.c index eb38c2f45..dcb4fb3f3 100644 --- a/iguana/exchanges/LP_instantdex.c +++ b/iguana/exchanges/LP_instantdex.c @@ -88,7 +88,11 @@ void LP_instantdex_filescreate(char *coinaddr) jaddibits256(array,txid); if ( (txobj= LP_gettxout("KMD",coinaddr,txid,0)) != 0 ) free_json(txobj); - else continue; + else + { + char str[65]; printf("%s/v%d is already spent\n",bits256_str(str,txid),0); + continue; + } jaddibits256(newarray,txid); } fclose(fp); @@ -102,7 +106,7 @@ void LP_instantdex_filescreate(char *coinaddr) void LP_instantdex_depositadd(char *coinaddr,bits256 txid) { static FILE *depositsfp; - char fname[512]; bits256 prevtxid; cJSON *array,*txobj; int32_t i,n,iter; + char fname[512],str[65]; bits256 prevtxid; cJSON *array,*txobj; int32_t i,n,iter; if ( depositsfp == 0 ) { sprintf(fname,"%s/deposits.%s",GLOBAL_DBDIR,coinaddr), OS_compatible_path(fname); @@ -118,11 +122,12 @@ void LP_instantdex_depositadd(char *coinaddr,bits256 txid) for (i=0; i Date: Thu, 7 Dec 2017 20:39:25 +0400 Subject: [PATCH 2/3] Test --- iguana/exchanges/LP_instantdex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_instantdex.c b/iguana/exchanges/LP_instantdex.c index dcb4fb3f3..cb5289aee 100644 --- a/iguana/exchanges/LP_instantdex.c +++ b/iguana/exchanges/LP_instantdex.c @@ -122,7 +122,7 @@ void LP_instantdex_depositadd(char *coinaddr,bits256 txid) for (i=0; i Date: Thu, 7 Dec 2017 20:46:27 +0400 Subject: [PATCH 3/3] Test --- iguana/exchanges/LP_instantdex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/iguana/exchanges/LP_instantdex.c b/iguana/exchanges/LP_instantdex.c index cb5289aee..891304f29 100644 --- a/iguana/exchanges/LP_instantdex.c +++ b/iguana/exchanges/LP_instantdex.c @@ -131,6 +131,7 @@ void LP_instantdex_depositadd(char *coinaddr,bits256 txid) continue; } LP_instantdex_deposituniq(depositsfp,prevtxid); + fflush(depositsfp); } } free_json(array);