Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
87382417a8
  1. 11
      iguana/iguana_unspents.c

11
iguana/iguana_unspents.c

@ -557,7 +557,7 @@ int32_t iguana_unspent_check(struct supernet_info *myinfo,struct iguana_info *co
int32_t iguana_unspentslists(struct supernet_info *myinfo,struct iguana_info *coin,int64_t *totalp,int64_t *unspents,int32_t max,int64_t required,int32_t minconf,cJSON *addresses,char *remoteaddr)
{
int64_t total,sum = 0; uint32_t unspentind; int32_t i,n,j,r,hdrsi,numunspents,numaddrs; uint8_t addrtype,pubkey[65],rmd160[20]; char *coinaddr,str[65]; struct iguana_waddress *waddr; struct iguana_waccount *wacct; struct basilisk_unspent *bu;
int64_t *candidates,total,sum = 0; uint32_t unspentind; int32_t i,n,j,r,hdrsi,numunspents,numaddrs; uint8_t addrtype,pubkey[65],rmd160[20]; char *coinaddr,str[65]; struct iguana_waddress *waddr; struct iguana_waccount *wacct; struct basilisk_unspent *bu;
*totalp = 0;
if ( (numaddrs= cJSON_GetArraySize(addresses)) == 0 )
{
@ -579,14 +579,15 @@ int32_t iguana_unspentslists(struct supernet_info *myinfo,struct iguana_info *co
iguana_pkhasharray(myinfo,coin,0,minconf,coin->longestchain,&total,0,coin->bundlescount,rmd160,coinaddr,pubkey,coin->blocks.hwmchain.height - minconf,unspents,&n,max-1000,remoteaddr);
if ( n > 0 )
{
candidates = unspents;
for (j=0; j<n; j++)
{
hdrsi = (int32_t)(*unspents >> 32);
unspentind = (int32_t)*unspents;
hdrsi = (int32_t)(candidates[j << 1] >> 32);
unspentind = (int32_t)candidates[j << 1];
if ( iguana_unspent_check(myinfo,coin,hdrsi,unspentind) == 0 )
{
printf("(%d u%d) %.8f not in mempool\n",hdrsi,unspentind,dstr(unspents[1]));
sum += unspents[1];
printf("(%d u%d) %.8f not in mempool\n",hdrsi,unspentind,dstr(candidates[(j << 1) + 1]));
sum += candidates[(j << 1) + 1];
unspents += 2;
numunspents++;
}

Loading…
Cancel
Save