Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
cb9d7beaed
  1. 2
      iguana/iguana_bundles.c
  2. 2
      iguana/iguana_ramchain.c
  3. 8
      iguana/iguana_unspents.c
  4. 2
      iguana/main.c

2
iguana/iguana_bundles.c

@ -691,7 +691,7 @@ int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp)
for (i=0; i<bp->hdrsi; i++)
if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish <= 1 || prevbp->utxofinish == 0 )
break;
if ( bp->hdrsi < coin->blocks.hwmchain.height/coin->chain->bundlesize && i > bp->hdrsi-8 && time(NULL) > bp->emitfinish+10 )//&& coin->emitbusy <= 4 )
if ( bp->hdrsi < coin->blocks.hwmchain.height/coin->chain->bundlesize && i > bp->hdrsi-IGUANA_NUMHELPERS/2 && time(NULL) > bp->emitfinish+10 )//&& coin->emitbusy <= 4 )
{
if ( bp->startutxo == 0 )
{

2
iguana/iguana_ramchain.c

@ -153,7 +153,7 @@ int32_t iguana_peerfile_exists(struct iguana_info *coin,struct iguana_peer *addr
#define RAMCHAIN_DESTPTRS dest,&destB,&destT,&destU,&destS,&destP,&destA,&destX,&destUx,&destSx,&destTXbits,&destPKbits,&destKspace
#define RAMCHAIN_DESTDECLARE struct iguana_blockRO *destB; struct iguana_txid *destT; struct iguana_unspent20 *destU; struct iguana_spend256 *destS; struct iguana_pkhash *destP; struct iguana_account *destA; bits256 *destX; struct iguana_unspent *destUx; struct iguana_spend *destSx; uint8_t *destTXbits,*destPKbits,*destKspace;
uint32_t iguana_ramchain_addtxid(struct iguana_info *coin,RAMCHAIN_FUNC,bits256 txid,int32_t numvouts,int32_t numvins,uint32_t locktime,uint32_t version,uint32_t timestamp)
uint32_t iguana_ramchain_addtxid(struct iguana_info *coin,RAMCHAIN_FUNC,bits256 txid,int32_t numvouts,int32_t numvins,uint32_t locktime,uint32_t version,uint32_t timestamp,int16_t bundlei)
{
uint32_t txidind; struct iguana_txid *t; struct iguana_kvitem *ptr;
txidind = ramchain->H.txidind;

8
iguana/iguana_unspents.c

@ -724,9 +724,9 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
printf("unexpected spendbp: height.%d bp.[%d] U%d <- S%d.[%d] [ext.%d %s prev.%d]\n",bp->bundleheight+i,spentbp->hdrsi,spent_unspentind,spendind,bp->hdrsi,s->external,bits256_str(str,prevhash),s->prevout);
errs++;
}
if ( coin->PREFETCHLAG != 0 && now > spentbp->lastprefetch+coin->PREFETCHLAG )
if ( coin->PREFETCHLAG != 0 && now >= spentbp->lastprefetch+coin->PREFETCHLAG )
{
printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
//printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
spentbp->lastprefetch = now;
}
@ -959,9 +959,9 @@ int32_t iguana_RTutxo(struct iguana_info *coin,struct iguana_bundle *bp,struct i
if ( (++num % 100000) == 0 )
printf("externalspents.[%d] ave %.2f micros, total %.2f seconds\n",num,(totalmillis*1000.)/num,totalmillis/1000.);
rdata = spentbp->ramchain.H.data;
if ( 0 && now > spentbp->lastprefetch+60 )
if ( coin->PREFETCHLAG != 0 && now >= spentbp->lastprefetch+coin->PREFETCHLAG )
{
printf("RT prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
//printf("RT prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
spentbp->lastprefetch = now;
}

2
iguana/main.c

@ -1185,7 +1185,7 @@ void iguana_main(void *arg)
iguana_launch(btcd,"iguana_coins",iguana_coins,coinargs,IGUANA_PERMTHREAD);
char *str;
if ( (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"prefetchlag\":2,\"VALIDATE\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":166,\"services\":1}"),0,myinfo->rpcport)) != 0 )
if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"prefetchlag\":2,\"VALIDATE\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":166,\"services\":1}"),0,myinfo->rpcport)) != 0 )
free(str);
#ifdef __APPLE__
if ( 1 )

Loading…
Cancel
Save