jl777 7 years ago
parent
commit
054a87a548
  1. 4
      iguana/exchanges/LP_rpc.c
  2. 2
      iguana/exchanges/LP_socket.c

4
iguana/exchanges/LP_rpc.c

@ -251,6 +251,8 @@ cJSON *LP_gettx(char *symbol,bits256 txid)
coin = LP_coinfind(symbol);
if ( coin == 0 )
return(cJSON_Parse("{\"error\":\"no coin\"}"));
if ( bits256_nonz(txid) == 0 )
return(cJSON_Parse("{\"error\":\"null txid\"}"));
if ( coin->electrum == 0 )
{
sprintf(buf,"[\"%s\", 1]",bits256_str(str,txid));
@ -290,6 +292,8 @@ cJSON *LP_gettxout(char *symbol,bits256 txid,int32_t vout)
coin = LP_coinfind(symbol);
if ( coin == 0 )
return(cJSON_Parse("{\"error\":\"no coin\"}"));
if ( bits256_nonz(txid) == 0 )
return(cJSON_Parse("{\"error\":\"null txid\"}"));
if ( coin->electrum == 0 )
{
sprintf(buf,"[\"%s\", %d, true]",bits256_str(str,txid),vout);

2
iguana/exchanges/LP_socket.c

@ -502,6 +502,8 @@ cJSON *electrum_getmerkle(char *symbol,struct electrum_info *ep,cJSON **retjsonp
{
char params[128],str[65];
sprintf(params,"[\"%s\", %d]",bits256_str(str,txid),height);
if ( bits256_nonz(txid) == 0 )
return(cJSON_Parse("{\"error\":\"null txid\"}"));
return(electrum_submit(symbol,ep,retjsonp,"blockchain.transaction.get_merkle",params,ELECTRUM_TIMEOUT));
}

Loading…
Cancel
Save