From 23b582cfd1490f073e46fe9e79a5b25db8aae211 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 3 Dec 2017 16:46:32 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_bitcoin.c | 2 ++ iguana/exchanges/LP_rpc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_bitcoin.c b/iguana/exchanges/LP_bitcoin.c index f9c212cd1..e4fb09e5d 100644 --- a/iguana/exchanges/LP_bitcoin.c +++ b/iguana/exchanges/LP_bitcoin.c @@ -2008,6 +2008,8 @@ int32_t bitcoin_p2shscript(uint8_t *script,int32_t n,const uint8_t *p2shscript,c char *bitcoind_passthru(char *coinstr,char *serverport,char *userpass,char *method,char *params) { + if ( userpass[0] == 0 ) + return(clonestr("{\"error\":\"no rpcusername rpcpassword in coin.conf\"}")); return(bitcoind_RPC(0,coinstr,serverport,userpass,method,params,4)); } diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index e3b8e5d07..169192f54 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -93,7 +93,7 @@ int32_t LP_getheight(int32_t *notarizedp,struct iguana_info *coin) if ( coin == 0 ) return(-1); height = coin->height; - if ( coin->electrum == 0 && time(NULL) > coin->heighttime+60 ) + if ( coin->electrum == 0 && time(NULL) > coin->heighttime+60 && coin->userpass[0] != 0 ) { if ( strcmp(coin->symbol,"BTC") == 0 ) method = "getblockchaininfo";