|
|
@ -543,7 +543,7 @@ cJSON *electrum_address_getmempool(char *symbol,struct electrum_info *ep,cJSON * |
|
|
|
|
|
|
|
cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON **retjsonp,char *addr,int32_t electrumflag) |
|
|
|
{ |
|
|
|
cJSON *retjson=0; struct LP_address *ap; struct iguana_info *coin; int32_t height,usecache=1; |
|
|
|
cJSON *retjson=0; char *retstr; struct LP_address *ap; struct iguana_info *coin; int32_t height,usecache=1; |
|
|
|
if ( (coin= LP_coinfind(symbol)) == 0 ) |
|
|
|
return(0); |
|
|
|
if ( ep == 0 || ep->heightp == 0 ) |
|
|
@ -565,7 +565,15 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON |
|
|
|
{ |
|
|
|
printf("%s.%d u.%u/%d t.%ld %s LISTUNSPENT.(%d)\n",coin->symbol,height,ap->unspenttime,ap->unspentheight,time(NULL),addr,(int32_t)strlen(jprint(retjson,0))); |
|
|
|
if ( electrum_process_array(coin,ep,addr,retjson,electrumflag) != 0 ) |
|
|
|
{ |
|
|
|
LP_postutxos(coin->symbol,addr); |
|
|
|
if ( strcmp(addr,coin->smartaddr) == 0 ) |
|
|
|
{ |
|
|
|
retstr = jprint(retjson,0); |
|
|
|
LP_unspents_cache(coin->symbol,coin->smartaddr,retstr); |
|
|
|
free(retstr); |
|
|
|
} |
|
|
|
} |
|
|
|
if ( ap != 0 ) |
|
|
|
{ |
|
|
|
ap->unspenttime = (uint32_t)time(NULL); |
|
|
|