diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 67ac9a102..35a367642 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -2011,7 +2011,7 @@ long iguana_ramchain_data(struct iguana_info *coin,struct iguana_peer *addr,stru for (j=0; jtx_out; j++) { memset(rmd160,0,sizeof(rmd160)); - iguana_ramchain_addunspent20(coin,RAMCHAIN_ARG,tx->vouts[j].value,tx->vouts[j].pk_script,tx->vouts[j].pk_scriptlen,tx->txid,j,-1,bp,rmd160); + //iguana_ramchain_addunspent20(coin,RAMCHAIN_ARG,tx->vouts[j].value,tx->vouts[j].pk_script,tx->vouts[j].pk_scriptlen,tx->txid,j,-1,bp,rmd160); } ramchain->H.spendind += tx->tx_in; } @@ -2022,7 +2022,7 @@ long iguana_ramchain_data(struct iguana_info *coin,struct iguana_peer *addr,stru for (j=0; jtx_in; j++) { //char str[65]; printf("PT vin.%d %s vout.%d\n",j,bits256_str(str,tx->vins[j].prev_hash),tx->vins[j].prev_vout); - //iguana_ramchain_addspend256(coin,RAMCHAIN_ARG,tx->vins[j].prev_hash,tx->vins[j].prev_vout,tx->vins[j].vinscript,tx->vins[j].scriptlen,tx->vins[j].sequence,bp);//,bp->hdrsi,bundlei); + iguana_ramchain_addspend256(coin,RAMCHAIN_ARG,tx->vins[j].prev_hash,tx->vins[j].prev_vout,tx->vins[j].vinscript,tx->vins[j].scriptlen,tx->vins[j].sequence,bp);//,bp->hdrsi,bundlei); //int32_t k; for (k=0; kvins[j].scriptlen; k++) // printf("%02x",tx->vins[j].vinscript[k]); //printf(" msg spendind.%d\n",ramchain->H.spendind); diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 166495e16..e1da8ff5e 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -904,10 +904,11 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr) flag++; myfree(req,sizeof(*req)); } - else //if ( addr->rank > 1 ) + else if ( addr->rank > 1 ) { gap = addr->rank * coin->peers.numranked * 3; - for (i=0; ipeers.numranked; i++,gap++) + gap += (long)OS_milliseconds() % (coin->peers.numranked * 3); + //for (i=0; ipeers.numranked; i++) { hdrsi = (coin->blocks.hwmchain.height + gap) / coin->chain->bundlesize; if ( (bp= coin->bundles[hdrsi]) != 0 ) @@ -918,7 +919,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr) printf("near hwm gap.%d peer.%s ranked.%d [%d:%d] pending.%d\n",gap,addr->ipaddr,bp->rank,bp->hdrsi,i,addr->pendblocks); block->numrequests++; iguana_sendblockreqPT(coin,addr,bp,bundlei,block->RO.hash2,1); - break; + //break; } } }