Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
6513d458e6
  1. 4
      iguana/iguana_unspents.c
  2. 12
      iguana/iguana_wallet.c

4
iguana/iguana_unspents.c

@ -636,12 +636,12 @@ int64_t iguana_RTunspents(struct supernet_info *myinfo,struct iguana_info *coin,
bitcoin_address(coinaddr,addrtypes[i],&rmdarray[i * 20],20);
*numunspentsp = 0;
iguana_RTpkhasharray(myinfo,coin,array,minconf,maxconf,&total,P,coin->bundlescount,&rmdarray[i * 20],coinaddr,&pubkeys[33*i],lastheight,unspents != 0 ? &unspents[numunspents] : 0,numunspentsp,maxunspents,remoteaddr,includespent);
printf("iguana_unspents: i.%d of %d: %s %.8f numunspents.%d\n",i,numrmds,coinaddr,dstr(total),*numunspentsp);
//printf("iguana_unspents: i.%d of %d: %s %.8f numunspents.%d\n",i,numrmds,coinaddr,dstr(total),*numunspentsp);
maxunspents -= *numunspentsp;
numunspents += *numunspentsp;
sum += total;
}
printf("sum %.8f\n",dstr(sum));
//printf("sum %.8f\n",dstr(sum));
free(P);
}
*numunspentsp = numunspents;

12
iguana/iguana_wallet.c

@ -1023,9 +1023,9 @@ int64_t iguana_addressreceived(struct supernet_info *myinfo,struct iguana_info *
jaddibits256(txids,jbits256(item,"txid"));
if ( vouts != 0 )
jaddinum(vouts,jint(item,"vout"));
if ( unspents != 0 && (jobj(item,"spent") == 0 || jobj(item,"dest") == 0) )
if ( unspents != 0 && jobj(item,"unspent") != 0 && jobj(item,"spent") == 0 && jobj(item,"dest") == 0 )
jaddi(unspents,jduplicate(item));
if ( spends != 0 && jobj(item,"spent") != 0 && jobj(item,"dest") != 0 )
if ( spends != 0 && (jobj(item,"spent") != 0 || jobj(item,"dest") != 0) )
jaddi(spends,jduplicate(item));
}
}
@ -1034,10 +1034,10 @@ int64_t iguana_addressreceived(struct supernet_info *myinfo,struct iguana_info *
}
free(balancestr);
}
//if ( spends != 0 )
// printf("SPENDS.(%s)\n",jprint(spends,0));
//if ( unspents != 0 )
// printf("UNSPENTS.(%s)\n",jprint(unspents,0));
if ( spends != 0 )
printf("SPENDS.(%s)\n",jprint(spends,0));
if ( unspents != 0 )
printf("UNSPENTS.(%s)\n",jprint(unspents,0));
return(balance);
}

Loading…
Cancel
Save