Browse Source

Test

etomic
jl777 8 years ago
parent
commit
12fe3efcce
  1. 11
      basilisk/jumblr.c

11
basilisk/jumblr.c

@ -99,6 +99,13 @@ char *jumblr_zlistreceivedbyaddress(struct supernet_info *myinfo,struct iguana_i
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_listreceivedbyaddress",params));
}
char *jumblr_listreceivedbyaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *addr)
{
char params[1024];
sprintf(params,"[\"%s\", 1]",addr);
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"listreceivedbyaddress",params));
}
char *jumblr_zgetbalance(struct supernet_info *myinfo,struct iguana_info *coin,char *addr)
{
char params[1024];
@ -109,9 +116,9 @@ char *jumblr_zgetbalance(struct supernet_info *myinfo,struct iguana_info *coin,c
int64_t jumblr_receivedby(struct supernet_info *myinfo,struct iguana_info *coin,char *addr)
{
char *retstr; cJSON *retjson,*item; int32_t i,n; int64_t total = 0;
if ( (retstr= jumblr_zlistreceivedbyaddress(myinfo,coin,addr)) != 0 )
if ( (retstr= jumblr_listreceivedbyaddress(myinfo,coin,addr)) != 0 )
{
printf("z_listreceivedbyaddress.(%s) -> (%s)\n",addr,retstr);
printf("listreceivedbyaddress.(%s) -> (%s)\n",addr,retstr);
if ( (retjson= cJSON_Parse(retstr)) != 0 )
{
if ( (n= cJSON_GetArraySize(retjson)) > 0 )

Loading…
Cancel
Save