From 3fa4d02a6cf6619e2e4a3b9366f923618a722c59 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 20 Sep 2016 16:19:18 -0300 Subject: [PATCH] test --- iguana/iguana_unspents.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 2d1d57262..fb8d619ba 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -991,14 +991,16 @@ int32_t iguana_unspentfindjson(cJSON *destarray,cJSON *item) cJSON *iguana_RTlistunspent(struct supernet_info *myinfo,struct iguana_info *coin,cJSON *argarray,int32_t minconf,int32_t maxconf,char *remoteaddr,int32_t includespends) { - int32_t i,j,m,n,numrmds,numunspents=0; char *coinaddr,*retstr; uint8_t *rmdarray; cJSON *vals,*unspents,*item,*array,*retjson,*retarray; bits256 hash; + uint64_t total = 0; int32_t i,j,m,n,numrmds,numunspents=0; char *coinaddr,*retstr; uint8_t *rmdarray; cJSON *vals,*unspents,*item,*array,*retjson,*retarray; bits256 hash; if ( coin->FULLNODE != 0 || coin->VALIDATENODE != 0 ) { retjson = cJSON_CreateArray(); rmdarray = iguana_rmdarray(myinfo,coin,&numrmds,argarray,0); - iguana_RTunspents(myinfo,coin,retjson,minconf,maxconf,rmdarray,numrmds,(1 << 30),0,&numunspents,remoteaddr,includespends); + total = iguana_RTunspents(myinfo,coin,retjson,minconf,maxconf,rmdarray,numrmds,(1 << 30),0,&numunspents,remoteaddr,includespends); if ( rmdarray != 0 ) free(rmdarray); + jaddnum(retjson,"total",dstr(total)); + jaddnum(retjson,"balance",dstr(total)); } else {