jl777 7 years ago
parent
commit
1327ee506d
  1. 2
      iguana/exchanges/LP_transaction.c
  2. 10
      iguana/exchanges/LP_utxo.c

2
iguana/exchanges/LP_transaction.c

@ -70,9 +70,9 @@ int32_t LP_gettx_presence(int32_t *numconfirmsp,char *symbol,bits256 expectedtxi
txid = jbits256(txobj,"txid");
if ( jobj(txobj,"error") == 0 && bits256_cmp(txid,expectedtxid) == 0 )
{
*numconfirmsp = 0;
if ( numconfirmsp != 0 && coinaddr != 0 && (coin= LP_coinfind(symbol)) != 0 && coin->electrum != 0 )
{
*numconfirmsp = 0;
//char str[65]; printf("%s %s already in gettx (%s)\n",coinaddr,bits256_str(str,txid),jprint(txobj,0));
if ( (retjson= electrum_address_gethistory(symbol,coin->electrum,&retjson,coinaddr,expectedtxid)) != 0 )
{

10
iguana/exchanges/LP_utxo.c

@ -871,10 +871,10 @@ int32_t LP_txheight(struct iguana_info *coin,bits256 txid)
bits256 blockhash; struct LP_transaction *tx=0; cJSON *blockobj,*retjson,*txobj,*txobj2; int32_t height = 0;
if ( coin == 0 )
return(-1);
/*if ( (tx= LP_transactionfind(coin,txid)) != 0 )
if ( (tx= LP_transactionfind(coin,txid)) != 0 )
height = tx->height;
if ( height > 1 )
return(height);*/
if ( height > 0 )
return(height);
if ( coin->electrum == 0 )
{
if ( (txobj= LP_gettx("LP_txheight",coin->symbol,txid,0)) != 0 )
@ -906,8 +906,8 @@ int32_t LP_txheight(struct iguana_info *coin,bits256 txid)
}
else
{
if ( (tx= LP_transactionfind(coin,txid)) != 0 )
height = tx->height;
//if ( (tx= LP_transactionfind(coin,txid)) != 0 )
// height = tx->height;
if ( height == 0 )
{
if ( (retjson= electrum_transaction(&height,coin->symbol,coin->electrum,&retjson,txid,0)) != 0 )

Loading…
Cancel
Save