Browse Source

Test

etomic
jl777 7 years ago
parent
commit
783c758928
  1. 2
      iguana/exchanges/LP_cache.c
  2. 2
      iguana/exchanges/LP_rpc.c
  3. 11
      iguana/exchanges/LP_socket.c
  4. 6
      iguana/exchanges/LP_utxo.c

2
iguana/exchanges/LP_cache.c

@ -330,7 +330,7 @@ uint64_t LP_unspents_load(char *symbol,char *addr)
balance += j64bits(item,"value");
}
}
electrum_process_array(coin,coin->electrum,coin->smartaddr,retjson,1);
electrum_process_array(coin,coin->electrum,addr,retjson,1);
free_json(retjson);
}
free(arraystr);

2
iguana/exchanges/LP_rpc.c

@ -586,7 +586,7 @@ cJSON *LP_validateaddress(char *symbol,char *address)
}
bitcoin_address(coinaddr,coin->taddr,coin->pubtype,G.LP_myrmd160,20);
jadd(retjson,"ismine",strcmp(address,coin->smartaddr) == 0 ? cJSON_CreateTrue() : cJSON_CreateFalse());
jadd(retjson,"iswatchonly",cJSON_CreateFalse());
jadd(retjson,"iswatchonly",cJSON_CreateTrue());
jadd(retjson,"isscript",addrtype == coin->p2shtype ? cJSON_CreateTrue() : cJSON_CreateFalse());
return(retjson);
}

11
iguana/exchanges/LP_socket.c

@ -606,12 +606,9 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON
//LP_postutxos(coin->symbol,addr);
updatedflag = 1;
}
//if ( strcmp(addr,coin->smartaddr) == 0 )
{
retstr = jprint(retjson,0);
LP_unspents_cache(coin->symbol,coin->smartaddr,retstr,1);
free(retstr);
}
retstr = jprint(retjson,0);
LP_unspents_cache(coin->symbol,addr,retstr,1);
free(retstr);
if ( ap != 0 )
{
ap->unspenttime = (uint32_t)time(NULL);
@ -627,7 +624,7 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON
}
if ( retjson == 0 )
{
if ( (retstr= LP_unspents_filestr(symbol,coin->smartaddr)) != 0 )
if ( (retstr= LP_unspents_filestr(symbol,addr)) != 0 )
{
retjson = cJSON_Parse(retstr);
free(retstr);

6
iguana/exchanges/LP_utxo.c

@ -560,9 +560,9 @@ cJSON *LP_address_balance(struct iguana_info *coin,char *coinaddr,int32_t electr
}
else
{
if ( strcmp(coin->smartaddr,coinaddr) == 0 )
//if ( strcmp(coin->smartaddr,coinaddr) == 0 )
balance = LP_unspents_load(coin->symbol,coinaddr);
else
/*else
{
if ( (array= LP_address_utxos(coin,coinaddr,1)) != 0 )
{
@ -576,7 +576,7 @@ cJSON *LP_address_balance(struct iguana_info *coin,char *coinaddr,int32_t electr
}
free_json(array);
}
}
}*/
}
retjson = cJSON_CreateObject();
jaddstr(retjson,"result","success");

Loading…
Cancel
Save