From 77b4fa70b8427ff5c775a7697a7e1a5d9f1ba218 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 28 Jan 2018 16:09:54 +0400 Subject: [PATCH] Print orig coinaddr in 0conf deposit error --- iguana/exchanges/LP_include.h | 2 +- iguana/exchanges/LP_instantdex.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index eeff1ee7a..63f565233 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -517,7 +517,7 @@ struct LP_address_utxo *LP_address_utxofind(struct iguana_info *coin,char *coina int64_t LP_myzcredits(); void test_validate(struct iguana_info *coin,char *signedtx); void LP_instantdex_depositadd(char *coinaddr,bits256 txid); -int64_t LP_instantdex_creditcalc(struct iguana_info *coin,int32_t dispflag,bits256 txid,char *refaddr); +int64_t LP_instantdex_creditcalc(struct iguana_info *coin,int32_t dispflag,bits256 txid,char *refaddr,char *origcoinaddr); void LP_ports(uint16_t *pullportp,uint16_t *pubportp,uint16_t *busportp,uint16_t netid); int32_t LP_destaddr(char *destaddr,cJSON *item); int32_t LP_waitmempool(char *symbol,char *coinaddr,bits256 txid,int32_t vout,int32_t duration); diff --git a/iguana/exchanges/LP_instantdex.c b/iguana/exchanges/LP_instantdex.c index 41496ba52..f0b6aa50a 100644 --- a/iguana/exchanges/LP_instantdex.c +++ b/iguana/exchanges/LP_instantdex.c @@ -133,7 +133,7 @@ void LP_instantdex_depositadd(char *coinaddr,bits256 txid) { prevtxid = jbits256i(array,i); //char str[65]; printf("instantdex iter.%d i.%d check %s\n",iter,i,bits256_str(str,prevtxid)); - if ( LP_instantdex_creditcalc(coin,0,prevtxid,coinaddr) > 0 ) + if ( LP_instantdex_creditcalc(coin,0,prevtxid,coinaddr,coinaddr) > 0 ) { LP_instantdex_deposituniq(fp,prevtxid); fflush(fp); @@ -400,7 +400,7 @@ int64_t LP_instantdex_credit(int32_t dispflag,char *coinaddr,int64_t satoshis,in return(0); } -int64_t LP_instantdex_creditcalc(struct iguana_info *coin,int32_t dispflag,bits256 txid,char *refaddr) +int64_t LP_instantdex_creditcalc(struct iguana_info *coin,int32_t dispflag,bits256 txid,char *refaddr,char *origcoinaddr) { cJSON *txjson,*vouts,*txobj,*item; int64_t satoshis=0,amount64; int32_t weeki,numvouts; char destaddr[64],p2shaddr[64]; if ( (txjson= LP_gettx(coin->symbol,txid,0)) != 0 ) @@ -410,7 +410,7 @@ int64_t LP_instantdex_creditcalc(struct iguana_info *coin,int32_t dispflag,bits2 { if ( refaddr != 0 && strcmp(refaddr,destaddr) != 0 ) { - printf("LP_instantdex_creditcalc for (%s) but deposit sent for (%s)\n",refaddr,destaddr); + printf("LP_instantdex_creditcalc for (%s) but deposit sent for orig.(%s) (%s)\n",refaddr,origcoinaddr,destaddr); } else { @@ -529,7 +529,7 @@ int64_t LP_instantdex_proofcheck(char *symbol,char *coinaddr,cJSON *proof,int32_ break; } if ( j == i ) - LP_instantdex_creditcalc(coin,1,txid,othersmartaddr); + LP_instantdex_creditcalc(coin,1,txid,othersmartaddr,coinaddr); } credits = ap->instantdex_credits; ap->didinstantdex = 1;