Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
aaea8c8b1c
  1. 6
      iguana/iguana_bundles.c
  2. 5
      iguana/iguana_unspents.c

6
iguana/iguana_bundles.c

@ -979,6 +979,12 @@ double iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,d
if ( aveduration != 0. )
mult = ((bp == coin->current) ? (strcmp("BTC",coin->symbol) != 0 ? .5 : 2) : 7.);
else mult = 3.;
if ( mult > 2 && bp->numcached > .95*bp->n )
{
if ( bp->numcached > .99*bp->n )
mult = 2.;
else mult = 1.;
}
if ( bp->numissued < bp->n )
max = bp->numissued;
else max = bp->origmissings;

5
iguana/iguana_unspents.c

@ -1988,12 +1988,13 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
struct iguana_bundle *bp; struct iguana_ramchaindata *rdata; int32_t bundlei,i,n,flag=0; bits256 hash2; struct iguana_peer *addr;
struct iguana_block *block=0; struct iguana_blockRO *B; struct iguana_ramchain *dest=0,blockR;
//starti = coin->RTheight % coin->chain->bundlesize;
if ( (bp= coin->current) != 0 && bp->hdrsi == coin->longestchain/coin->chain->bundlesize && bp->hdrsi == coin->balanceswritten && coin->RTheight >= bp->bundleheight && coin->RTheight < bp->bundleheight+bp->n && (coin->RTheight <= coin->blocks.hwmchain.height || time(NULL) > bp->lastRT) )
if ( (bp= coin->current) != 0 && bp->hdrsi == coin->longestchain/coin->chain->bundlesize && bp->hdrsi == coin->balanceswritten && coin->RTheight >= bp->bundleheight && coin->RTheight < bp->bundleheight+bp->n && (coin->RTheight <= coin->blocks.hwmchain.height || time(NULL) > bp->lastRT+10) )
{
printf("check RTheight.%d hwm.%d longest.%d\n",coin->RTheight,coin->blocks.hwmchain.height,coin->longestchain);
if ( bits256_cmp(coin->RThash1,bp->hashes[1]) != 0 )
coin->RThash1 = bp->hashes[1];
bp->lastRT = (uint32_t)time(NULL);
if ( 0 && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 )
if ( 1 && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 )
{
iguana_RThdrs(coin,bp,coin->peers.numranked);
coin->RThdrstime = bp->lastRT;

Loading…
Cancel
Save