Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
dd8d8c0129
  1. 12
      iguana/iguana777.c
  2. 7
      iguana/iguana_ramchain.c
  3. 2
      iguana/iguana_tx.c
  4. 6
      iguana/iguana_unspents.c

12
iguana/iguana777.c

@ -699,14 +699,22 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
// mult /= 2;
#endif
if ( (coin->startPEND= juint(json,"startpend")) == 0 )
coin->startPEND = IGUANA_MAXPENDBUNDLES*mult;
{
if ( strcmp("BTCD",coin->symbol) == 0 )
coin->startPEND = 500;
else coin->startPEND = IGUANA_MAXPENDBUNDLES*mult;
}
if ( coin->startPEND > maxval*mult )
coin->startPEND = maxval*mult;
else if ( coin->startPEND < 2 )
coin->startPEND = 2;
coin->MAXBUNDLES = coin->startPEND;
if ( (coin->endPEND= juint(json,"endpend")) == 0 )
coin->endPEND = IGUANA_MINPENDBUNDLES*mult;
{
if ( strcmp("BTCD",coin->symbol) == 0 )
coin->endPEND = 500;
else coin->endPEND = IGUANA_MINPENDBUNDLES*mult;
}
if ( coin->endPEND > maxval*mult )
coin->endPEND = maxval*mult;
else if ( coin->endPEND < 2 )

7
iguana/iguana_ramchain.c

@ -1249,10 +1249,15 @@ int32_t iguana_ramchain_free(struct iguana_info *coin,struct iguana_ramchain *ra
int32_t iguana_bundleremove(struct iguana_info *coin,int32_t hdrsi,int32_t tmpfiles)
{
struct iguana_bundle *bp; char fname[1024],str[65];
struct iguana_bundle *bp; int32_t i; char fname[1024],str[65];
if ( hdrsi >= 0 && hdrsi < coin->bundlescount && (bp= coin->bundles[hdrsi]) != 0 )
{
//printf("delete bundle.[%d]\n",hdrsi);
if ( tmpfiles != 0 )
{
for (i=0; i<bp->n; i++)
iguana_blockunmark(coin,bp->blocks[i],bp,i,1);
}
iguana_ramchain_free(coin,&bp->ramchain,0);
if ( iguana_bundlefname(coin,bp,fname) == 0 )
OS_removefile(fname,0);

2
iguana/iguana_tx.c

@ -166,7 +166,7 @@ int32_t iguana_ramtxbytes(struct iguana_info *coin,uint8_t *serialized,int32_t m
//for (i=0; i<len; i++)
// printf("%02x",serialized[i]);
char str[65],str2[65]; printf("\nrw.%d numvins.%d numvouts.%d error generating txbytes txid %s vs %s\n",rwflag,numvins,numvouts,bits256_str(str,*txidp),bits256_str(str2,tx->txid));
return(len);
return(-1);
}
return(len);
}

6
iguana/iguana_unspents.c

@ -1666,7 +1666,8 @@ void iguana_RTramchainfree(struct iguana_info *coin)
coin->RTheight = coin->balanceswritten * coin->chain->bundlesize;
coin->RTgenesis = 0;
iguana_ramchain_free(coin,&coin->RTramchain,1);
//iguana_mempurge(&coin->RTHASHMEM);
iguana_mempurge(&coin->RTmem);
iguana_mempurge(&coin->RThashmem);
}
void *iguana_ramchainfile(struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *R,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block)
@ -1901,10 +1902,11 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
{
printf("RTgenesis failed to verify n.%d vs %d\n",n,coin->RTheight);
iguana_RTramchainfree(coin);
return(-1);
}
}
if ( dest != 0 && flag != 0 )
printf("<<<< flag.%d RT.%d:%d hwm.%d L.%d T.%d U.%d S.%d P.%d X.%d -> size.%ld\n",flag,coin->RTheight,n,coin->blocks.hwmchain.height,coin->longestchain,dest->H.txidind,dest->H.unspentind,dest->H.spendind,dest->pkind,dest->externalind,(long)dest->H.data->allocsize);
printf("<<<< flag.%d RT.%d:%d hwm.%d L.%d T.%d U.%d S.%d P.%d X.%d -> size.%ld\n",flag,coin->RTheight,n,coin->blocks.hwmchain.height,coin->longestchain,dest->H.txidind,dest->H.unspentind,dest->H.spendind,dest->pkind,dest->externalind,dest->H.data!=0?(long)dest->H.data->allocsize:-1);
return(flag);
}

Loading…
Cancel
Save