Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
e6e4cdb8f2
  1. 4
      iguana/iguana_ramchain.c
  2. 7
      iguana/iguana_recv.c

4
iguana/iguana_ramchain.c

@ -2011,7 +2011,7 @@ long iguana_ramchain_data(struct iguana_info *coin,struct iguana_peer *addr,stru
for (j=0; j<tx->tx_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; j<tx->tx_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; k<tx->vins[j].scriptlen; k++)
// printf("%02x",tx->vins[j].vinscript[k]);
//printf(" msg spendind.%d\n",ramchain->H.spendind);

7
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; i<coin->peers.numranked; i++,gap++)
gap += (long)OS_milliseconds() % (coin->peers.numranked * 3);
//for (i=0; i<coin->peers.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;
}
}
}

Loading…
Cancel
Save