Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
db6a6460d2
  1. 4
      iguana/iguana_ramchain.c
  2. 2
      iguana/iguana_recv.c

4
iguana/iguana_ramchain.c

@ -1255,6 +1255,7 @@ int32_t iguana_ramchain_free(struct iguana_info *coin,struct iguana_ramchain *ra
myfree(item,sizeof(*item)); myfree(item,sizeof(*item));
} }
} }
}
if ( ramchain->txbits != 0 ) if ( ramchain->txbits != 0 )
{ {
free(ramchain->txbits); free(ramchain->txbits);
@ -1265,7 +1266,6 @@ int32_t iguana_ramchain_free(struct iguana_info *coin,struct iguana_ramchain *ra
free(ramchain->cacheT); free(ramchain->cacheT);
ramchain->cacheT = 0; ramchain->cacheT = 0;
} }
}
ramchain->txids = 0; ramchain->txids = 0;
ramchain->pkhashes = 0; ramchain->pkhashes = 0;
if ( ramchain->hashmem != 0 ) if ( ramchain->hashmem != 0 )
@ -2269,7 +2269,7 @@ int32_t iguana_ramchain_expandedsave(struct supernet_info *myinfo,struct iguana_
} }
} }
//printf("%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %llx ht.%d bundlehashes.%s\n",mapchain->H.data->lhashes[0].uints[0],mapchain->H.data->lhashes[1].uints[0],mapchain->H.data->lhashes[2].uints[0],mapchain->H.data->lhashes[3].uints[0],mapchain->H.data->lhashes[4].uints[0],mapchain->H.data->lhashes[5].uints[0],mapchain->H.data->lhashes[6].uints[0],mapchain->H.data->lhashes[7].uints[0],mapchain->H.data->lhashes[8].uints[0],mapchain->H.data->lhashes[9].uints[0],(long long)mapchain->H.data->sha256.txid,mapchain->height,coin->symbol); //printf("%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %llx ht.%d bundlehashes.%s\n",mapchain->H.data->lhashes[0].uints[0],mapchain->H.data->lhashes[1].uints[0],mapchain->H.data->lhashes[2].uints[0],mapchain->H.data->lhashes[3].uints[0],mapchain->H.data->lhashes[4].uints[0],mapchain->H.data->lhashes[5].uints[0],mapchain->H.data->lhashes[6].uints[0],mapchain->H.data->lhashes[7].uints[0],mapchain->H.data->lhashes[8].uints[0],mapchain->H.data->lhashes[9].uints[0],(long long)mapchain->H.data->sha256.txid,mapchain->height,coin->symbol);
iguana_ramchain_free(coin,mapchain,cmpflag); iguana_ramchain_free(coin,mapchain,1);
} }
iguana_mempurge(hashmem); iguana_mempurge(hashmem);
} }

2
iguana/iguana_recv.c

@ -72,7 +72,7 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr,
if ( memcmp(lastreq.bytes,hash2.bytes,sizeof(hash2)) == 0 || memcmp(lastreq2.bytes,hash2.bytes,sizeof(hash2)) == 0 ) if ( memcmp(lastreq.bytes,hash2.bytes,sizeof(hash2)) == 0 || memcmp(lastreq2.bytes,hash2.bytes,sizeof(hash2)) == 0 )
{ {
//printf("duplicate req %s or null addr.%p\n",bits256_str(hexstr,hash2),addr); //printf("duplicate req %s or null addr.%p\n",bits256_str(hexstr,hash2),addr);
if ( iamthreadsafe == 0 && (rand() % 3) != 0 ) if ( iamthreadsafe == 0 && (rand() % 10) != 0 )
return(0); return(0);
} }
if ( addr->usock < 0 ) if ( addr->usock < 0 )

Loading…
Cancel
Save