diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 8d024f850..34e7db5c7 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -606,7 +606,7 @@ uint32_t iguana_ramchain_addspend256(struct iguana_info *coin,struct iguana_peer int64_t iguana_hashmemsize(int64_t numtxids,int64_t numunspents,int64_t numspends,int64_t numpkinds,int64_t numexternaltxids,int64_t scriptspace) { int64_t allocsize = 0; - allocsize += 1.5 * (scriptspace + IGUANA_MAXSCRIPTSIZE + ((numtxids + numpkinds) * (sizeof(UT_hash_handle)*2)) + (((sizeof(struct iguana_account)) * 2 * numpkinds)) + (2 * numunspents * sizeof(struct iguana_spendvector))); + allocsize += 2 * (scriptspace + IGUANA_MAXSCRIPTSIZE + ((numtxids + numpkinds) * (sizeof(UT_hash_handle)*2)) + (((sizeof(struct iguana_account)) * 2 * numpkinds)) + (2 * numunspents * sizeof(struct iguana_spendvector))); if ( allocsize >= (1LL << 32) ) { printf("REALLY big hashmemsize %llu, truncate and hope for best\n",(long long)allocsize); @@ -2770,7 +2770,7 @@ void iguana_RTvout(struct iguana_info *coin,int64_t polarity,struct iguana_RTtxi script = vout->pk_script; scriptlen = vout->pk_scriptlen; type = iguana_calcrmd160(coin,0,&V,script,scriptlen,txid,j,0xffffffff); - //if ( (type == 12 && scriptlen == 0) || (type == 1 && bitcoin_pubkeylen(script+1) <= 0) ) + if ( (type == 12 && scriptlen == 0) || (type == 1 && bitcoin_pubkeylen(script+1) <= 0) ) { for (k=0; kRTcredits += polarity * value; if ( polarity > 0 ) { - printf("unspent[%d] <- %p\n",RTaddr->numunspents,unspent); + //printf("unspent[%d] <- %p\n",RTaddr->numunspents,unspent); RTaddr->numunspents++; unspent->prevunspent = RTaddr->lastunspent; RTaddr->lastunspent = unspent; @@ -517,7 +517,8 @@ void iguana_RTcoinaddr(struct iguana_info *coin,struct iguana_RTtxid *RTptr,stru //RTaddr->unspents[i] = RTaddr->unspents[--RTaddr->numunspents]; } } - printf("%lld %s %.8f h %.8f, cr %.8f deb %.8f [%.8f] numunspents.%d %p\n",(long long)polarity,coinaddr,dstr(value),dstr(RTaddr->histbalance),dstr(RTaddr->credits),dstr(RTaddr->debits),dstr(RTaddr->credits)-dstr(RTaddr->debits)+dstr(RTaddr->histbalance),RTaddr->numunspents,unspent); + if ( strcmp("BTC",coin->symbol) != 0 ) + printf("%lld %s %.8f h %.8f, cr %.8f deb %.8f [%.8f] numunspents.%d %p\n",(long long)polarity,coinaddr,dstr(value),dstr(RTaddr->histbalance),dstr(RTaddr->credits),dstr(RTaddr->debits),dstr(RTaddr->credits)-dstr(RTaddr->debits)+dstr(RTaddr->histbalance),RTaddr->numunspents,unspent); } struct iguana_RTunspent *iguana_RTunspent_create(uint8_t *rmd160,int64_t value,uint8_t *script,int32_t scriptlen) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 321226678..ac620023e 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -536,7 +536,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i req->addr = addr; //if ( (bits256_cmp(origtxdata->zblock.RO.hash2,coin->blocks.hwmchain.RO.hash2) == 0 || req->zblock.mainchain == 0 || req->zblock.valid == 0 || req->zblock.txvalid == 0) && iguana_RTrawdata(coin,origtxdata->zblock.RO.hash2,0,&len,&numtx,1) == 0 ) queue_enqueue("recvQ",&coin->recvQ,&req->DL,0); - if ( strcmp("BTCD",coin->symbol) == 0 ) + if ( 0 && strcmp("BTCD",coin->symbol) == 0 ) printf("%s Q.(%s)\n",coin->symbol,bits256_str(str,origtxdata->zblock.RO.hash2)); } else printf("nonz fpos.%d %s\n",txdata->zblock.fpos,bits256_str(str,origtxdata->zblock.RO.hash2)); } @@ -1226,7 +1226,7 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct struct iguana_bundlereq *iguana_recvblock(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_peer *addr,struct iguana_bundlereq *req,struct iguana_zblock *origblock,int32_t numtx,int32_t datalen,int32_t recvlen,int32_t *newhwmp) { struct iguana_bundle *bp=0,*prev; int32_t n,bundlei = -2; struct iguana_block *block,*next,*prevblock; char str[65]; bits256 hash2; - if ( strcmp("BTCD",coin->symbol) == 0 ) + if ( 0 && strcmp("BTCD",coin->symbol) == 0 ) printf("%s received.(%s) %s\n",coin->symbol,bits256_str(str,origblock->RO.hash2),addr->ipaddr); if ( (block= iguana_blockfind("recv",coin,origblock->RO.hash2)) != 0 ) iguana_blockcopy(coin->chain->zcash,coin->chain->auxpow,coin,block,(struct iguana_block *)origblock);