From f00f9247b8663af78c477da4680b2620d2b14fad Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 3 Dec 2017 18:27:37 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_rpc.c | 2 +- iguana/exchanges/LP_stats.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 169192f54..d84369890 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -52,7 +52,7 @@ cJSON *bitcoin_json(struct iguana_info *coin,char *method,char *params) //printf("issue.(%s, %s, %s, %s, %s)\n",coin->symbol,coin->serverport,coin->userpass,method,params); if ( coin->electrum != 0 && (strcmp(method,"getblock") == 0 || strcmp(method,"paxprice") == 0 || strcmp(method,"getrawmempool") == 0) ) return(cJSON_Parse("{\"error\":\"illegal electrum call\"}")); - if ( coin->inactive == 0 || strcmp(method,"importprivkey") == 0 || strcmp(method,"validateaddress") == 0 ) + if ( coin->inactive == 0 || strcmp(method,"importprivkey") == 0 || strcmp(method,"validateaddress") == 0 || strcmp(method,"getrawtransaction") == 0 || strcmp(method,"getblock") == 0 || strcmp(method,"getinfo") == 0 ) { if ( coin->electrum == 0 ) { diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index b053ea352..5cc3fdb8a 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -242,7 +242,7 @@ int32_t LP_dPoWheight(struct iguana_info *coin) // get dPoW protected height int32_t LP_finished_lastheight(struct LP_swapstats *sp) { - int32_t ht,height = 1; struct iguana_info *bob,*alice; char str[65]; + int32_t ht,height = 1; struct iguana_info *bob,*alice; //char str[65]; if ( (bob= LP_coinfind(sp->Q.srccoin)) != 0 && (alice= LP_coinfind(sp->Q.destcoin)) != 0 ) { if ( sp->bobneeds_dPoW != 0 ) @@ -251,25 +251,25 @@ int32_t LP_finished_lastheight(struct LP_swapstats *sp) { if ( (ht= LP_txheight(bob,sp->bobdeposit)) > sp->bobneeds_dPoW ) sp->bobneeds_dPoW = ht; - printf("%s bobdeposit.%d height.%d\n",bits256_str(str,sp->bobdeposit),ht,sp->bobneeds_dPoW); + //printf("%s bobdeposit.%d height.%d\n",bits256_str(str,sp->bobdeposit),ht,sp->bobneeds_dPoW); } if ( bits256_nonz(sp->bobpayment) != 0 ) { if ( (ht= LP_txheight(bob,sp->bobpayment)) > sp->bobneeds_dPoW ) sp->bobneeds_dPoW = ht; - printf("%s bobpayment.%d height.%d\n",bits256_str(str,sp->bobpayment),ht,sp->bobneeds_dPoW); + //printf("%s bobpayment.%d height.%d\n",bits256_str(str,sp->bobpayment),ht,sp->bobneeds_dPoW); } if ( bits256_nonz(sp->paymentspent) != 0 ) { if ( (ht= LP_txheight(bob,sp->paymentspent)) > sp->bobneeds_dPoW ) sp->bobneeds_dPoW = ht; - printf("%s paymentspent.%d height.%d\n",bits256_str(str,sp->paymentspent),ht,sp->bobneeds_dPoW); + //printf("%s paymentspent.%d height.%d\n",bits256_str(str,sp->paymentspent),ht,sp->bobneeds_dPoW); } if ( bits256_nonz(sp->depositspent) != 0 ) { if ( (ht= LP_txheight(bob,sp->depositspent)) > sp->bobneeds_dPoW ) sp->bobneeds_dPoW = ht; - printf("%s depositspent.%d height.%d\n",bits256_str(str,sp->depositspent),ht,sp->bobneeds_dPoW); + //printf("%s depositspent.%d height.%d\n",bits256_str(str,sp->depositspent),ht,sp->bobneeds_dPoW); } } if ( sp->aliceneeds_dPoW != 0 ) @@ -278,13 +278,13 @@ int32_t LP_finished_lastheight(struct LP_swapstats *sp) { if ( (ht= LP_txheight(alice,sp->alicepayment)) > sp->aliceneeds_dPoW ) sp->aliceneeds_dPoW = ht; - printf("%s alicepayment.%d height.%d\n",bits256_str(str,sp->alicepayment),ht,sp->aliceneeds_dPoW); + //printf("%s alicepayment.%d height.%d\n",bits256_str(str,sp->alicepayment),ht,sp->aliceneeds_dPoW); } if ( bits256_nonz(sp->Apaymentspent) != 0 ) { if ( (ht= LP_txheight(alice,sp->Apaymentspent)) > sp->aliceneeds_dPoW ) sp->aliceneeds_dPoW = ht; - printf("%s Apaymentspent.%d height.%d\n",bits256_str(str,sp->Apaymentspent),ht,sp->aliceneeds_dPoW); + //printf("%s Apaymentspent.%d height.%d\n",bits256_str(str,sp->Apaymentspent),ht,sp->aliceneeds_dPoW); } } }