From bea9dfd6f04560a0f7e6853013a0b04147cb3c11 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 13 Jul 2016 13:55:00 -0300 Subject: [PATCH] test --- iguana/iguana_unspents.c | 6 +++--- iguana/iguana_volatiles.c | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 9ee5a5611..33e37f4b4 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -454,7 +454,7 @@ int32_t iguana_pkhasharray(struct supernet_info *myinfo,struct iguana_info *coin } else { - //printf("%s pkhash balance.[%d] from m.%d check %.8f vs %.8f spent %.8f [%.8f]\n",coinaddr,i,m,dstr(netbalance),dstr(deposits),dstr(spent),dstr(deposits)-dstr(spent)); + printf("%s pkhash balance.[%d] from m.%d check %.8f vs %.8f spent %.8f [%.8f]\n",coinaddr,i,m,dstr(netbalance),dstr(deposits),dstr(spent),dstr(deposits)-dstr(spent)); total += netbalance; n++; } @@ -465,7 +465,7 @@ int32_t iguana_pkhasharray(struct supernet_info *myinfo,struct iguana_info *coin break; } numunspents += m; - //printf("%d: balance %.8f, lastunspent.%u m.%d num.%d max.%d\n",i,dstr(total),lastunspentind,m,numunspents,maxunspents); + printf("%d: balance %.8f, lastunspent.%u m.%d num.%d max.%d\n",i,dstr(total),lastunspentind,m,numunspents,maxunspents); } } if ( numunspentsp != 0 ) @@ -553,7 +553,7 @@ int32_t iguana_unspentslists(struct supernet_info *myinfo,struct iguana_info *co { if ( (coinaddr= jstri(addresses,i)) != 0 ) { - //printf("i.%d coinaddr.(%s) minconf.%d longest.%d diff.%d\n",i,coinaddr,minconf,coin->longestchain,coin->blocks.hwmchain.height - minconf); + printf("i.%d coinaddr.(%s) minconf.%d longest.%d diff.%d\n",i,coinaddr,minconf,coin->longestchain,coin->blocks.hwmchain.height - minconf); total = 0; n = 0; if ( coin->RELAYNODE != 0 || coin->VALIDATENODE != 0 ) diff --git a/iguana/iguana_volatiles.c b/iguana/iguana_volatiles.c index 54330dc67..84f6686a3 100755 --- a/iguana/iguana_volatiles.c +++ b/iguana/iguana_volatiles.c @@ -141,7 +141,7 @@ struct iguana_utxo iguana_utxofind(struct iguana_info *coin,int16_t spent_hdrsi, int32_t iguana_spentflag(struct supernet_info *myinfo,struct iguana_info *coin,int64_t *RTspendp,int32_t *spentheightp,struct iguana_ramchain *ramchain,int16_t spent_hdrsi,uint32_t spent_unspentind,int32_t height,int32_t minconf,int32_t maxconf,uint64_t amount) { uint32_t numunspents; int32_t vout,RTspentflag; struct iguana_utxo utxo; uint64_t confs,RTspend = 0; - struct iguana_ramchaindata *rdata; bits256 txid; + struct iguana_ramchaindata *rdata; bits256 txid; char str[65]; *spentheightp = -1; if ( (rdata= ramchain->H.data) == 0 ) return(0); @@ -151,10 +151,9 @@ int32_t iguana_spentflag(struct supernet_info *myinfo,struct iguana_info *coin,i *RTspendp = (amount == 0) ? coin->txfee : amount; if ( iguana_unspentind2txid(myinfo,coin,spentheightp,&txid,&vout,spent_hdrsi,spent_unspentind) == 0 && basilisk_addspend(myinfo,coin->symbol,txid,vout,0) != 0 ) { - char str[65]; - printf("found unspentind (%u %d) %s\n",spent_hdrsi,spent_unspentind,bits256_str(str,txid)); + printf("iguana_spentflag found unspentind (%u %d) %s\n",spent_hdrsi,spent_unspentind,bits256_str(str,txid)); return(-1); - } + } else printf("iguana_spentflag %s not in mempool\n",bits256_str(str,txid)); if ( utxo.spentflag != 0 && utxo.fromheight == 0 ) { printf("illegal unspentind.%u vs %u hdrs.%d zero fromheight?\n",spent_unspentind,numunspents,spent_hdrsi);