Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
62f1dff8e3
  1. 7
      crypto777/iguana_OS.c
  2. 15
      iguana/iguana_bundles.c
  3. 10
      iguana/iguana_ramchain.c

7
crypto777/iguana_OS.c

@ -354,8 +354,11 @@ void iguana_memreset(struct OS_memspace *mem)
void iguana_mempurge(struct OS_memspace *mem)
{
if ( mem->allocated > 0 && mem->ptr != 0 && mem->totalsize > 0 )
if ( mem->allocated != 0 && mem->ptr != 0 )//&& mem->totalsize > 0 )
{
printf("mempurge.(%s) %ld\n",mem->name,(long)mem->totalsize);
myfree(mem->ptr,mem->totalsize), mem->ptr = 0;
}
iguana_memreset(mem);
mem->totalsize = 0;
}
@ -375,7 +378,7 @@ void *iguana_meminit(struct OS_memspace *mem,char *name,void *ptr,int64_t totals
{
//static long alloc;
//alloc += totalsize;
//char str[65]; printf("iguana_meminit alloc %s\n",mbstr(str,alloc));
char str[65]; printf("iguana_meminit.(%s) alloc %s\n",name,mbstr(str,totalsize));
if ( (mem->ptr= mycalloc('d',1,totalsize)) == 0 )
{
printf("iguana_meminit: cant get %d bytes\n",(int32_t)totalsize);

15
iguana/iguana_bundles.c

@ -1212,18 +1212,17 @@ void iguana_unstickhdr(struct iguana_info *coin,struct iguana_bundle *bp,int32_t
void iguana_bundlemissings(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_bundle *bp,uint32_t now)
{
int32_t mult = 7,n=0,priority = 1;
int32_t mult = 3,n=0,priority = 1;
if ( now > bp->missingstime+3 )
{
if ( coin->current != 0 )
{
mult = bp->hdrsi - coin->current->hdrsi;
else if ( strcmp("BTC",coin->symbol) != 0 )
mult = 1;
else mult = 3;
if ( mult < 4 )
mult = 4;
else if ( mult > 7 )
mult = 7;
if ( mult < 2 )
mult = 2;
else if ( mult > 3 )
mult = 3;
} else mult = 1;
if ( coin->bandwidth < .7*coin->maxbandwidth )
{
mult--;

10
iguana/iguana_ramchain.c

@ -1220,9 +1220,9 @@ int32_t iguana_ramchain_verify(struct iguana_info *coin,struct iguana_ramchain *
int32_t iguana_ramchain_free(struct iguana_info *coin,struct iguana_ramchain *ramchain,int32_t deleteflag)
{
struct iguana_kvitem *item,*tmp; struct iguana_ramchaindata *rdata;
if ( (rdata= ramchain->H.data) == 0 )
return(-1);
if ( ramchain->H.ROflag != 0 && ramchain->hashmem == 0 )
//if ( (rdata= ramchain->H.data) == 0 )
// return(-1);
if ( (rdata= ramchain->H.data) != 0 && ramchain->H.ROflag != 0 && ramchain->hashmem == 0 )
{
if ( ramchain->A != ramchain->creditsA )
{
@ -1284,8 +1284,8 @@ int32_t iguana_ramchain_free(struct iguana_info *coin,struct iguana_ramchain *ra
ramchain->Xspendinds = 0;
}
//iguana_volatilespurge(coin,ramchain);
if ( deleteflag != 0 )
memset(ramchain,0,sizeof(*ramchain));
//if ( deleteflag != 0 )
// memset(ramchain,0,sizeof(*ramchain));
return(0);
}

Loading…
Cancel
Save