Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
185fdc198a
  1. 4
      iguana/iguana_bundles.c
  2. 2
      iguana/iguana_unspents.c

4
iguana/iguana_bundles.c

@ -544,7 +544,7 @@ int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle
if ( firsti < 0 )
firsti = i;
lasti = i;
if ( priority > 2 || bp->numsaved > bp->n-1 || ((bp->issued[i] == 0 || bp->issued[i] > 1) && now > bp->issued[i]+lag) )
if ( priority > 2 || bp->numsaved > bp->n-10 || ((bp->issued[i] == 0 || bp->issued[i] > 1) && now > bp->issued[i]+lag) )
{
iguana_bundleblock(coin,&hash2,bp,i);
if ( bits256_nonz(hash2) != 0 )
@ -554,7 +554,7 @@ int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle
if ( (addr= coin->peers.ranked[rand() % max]) != 0 && addr->usock >= 0 && addr->dead == 0 )
{
struct iguana_blockreq *req = 0;
if ( priority > 2 )
if ( priority > 2 || bp->numsaved > bp->n-10 )
iguana_sendblockreqPT(coin,addr,bp,i,hash2,0);
else
{

2
iguana/iguana_unspents.c

@ -1523,7 +1523,7 @@ int32_t iguana_spendvectorsaves(struct iguana_info *coin)
}
else if ( iguana_spendvectorsave(coin,bp,&bp->ramchain,bp->tmpspends,bp->numtmpspends,bp->ramchain.H.data->numspends) == 0 )
{
if ( bp->tmpspends != bp->ramchain.Xspendinds )
if ( bp->tmpspends != 0 && bp->tmpspends != bp->ramchain.Xspendinds )
myfree(bp->tmpspends,sizeof(*bp->tmpspends) * bp->numtmpspends);
bp->numtmpspends = 0;
bp->tmpspends = 0;

Loading…
Cancel
Save