Browse Source

test

etomic
jl777 8 years ago
parent
commit
87583201df
  1. 4
      iguana/kmd_lookup.h

4
iguana/kmd_lookup.h

@ -319,7 +319,10 @@ cJSON *kmd_listaddress(struct iguana_info *coin,char *coinaddr,int32_t mode)
{
struct kmd_addresshh *addr; struct kmd_transactionhh *ptr,*spent,*prev=0; uint8_t type_rmd160[21]; int32_t i,height; cJSON *array = cJSON_CreateArray();
if ( (height= kmd_height(coin)) > coin->kmd_height+3 )
{
printf("height.%d > kmd_height.%d\n",height,coin->kmd_height);
return(cJSON_Parse("[]"));
}
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],coinaddr);
if ( (addr= _kmd_address(coin,type_rmd160)) != 0 && (ptr= addr->prev) != 0 && ptr->tx != 0 )
{
@ -360,6 +363,7 @@ cJSON *kmd_getbalance(struct iguana_info *coin,char *coinaddr)
{
if ( (array= kmd_listaddress(coin,coinaddr,iter)) != 0 )
{
fprintf(stderr,"%s ",jprint(array,0));
if ( (n= cJSON_GetArraySize(array)) > 0 )
{
for (i=0; i<n; i++)

Loading…
Cancel
Save