Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
d03f09bfa6
  1. 6
      datachain/datachain.c
  2. 2
      iguana/iguana777.c
  3. 2
      iguana/iguana_blocks.c

6
datachain/datachain.c

@ -99,7 +99,7 @@ int32_t datachain_checkpoint_update(struct supernet_info *myinfo,struct iguana_i
void datachain_BTC_clock(struct supernet_info *myinfo,int32_t ordered,struct iguana_info *btc,int32_t height,uint32_t hdrsi,uint32_t unspentind,uint32_t timestamp) void datachain_BTC_clock(struct supernet_info *myinfo,int32_t ordered,struct iguana_info *btc,int32_t height,uint32_t hdrsi,uint32_t unspentind,uint32_t timestamp)
{ {
int32_t retval; struct iguana_info *btcd = iguana_coinfind("BTCD"); int32_t retval; struct iguana_info *btcd = iguana_coinfind("BTCD");
printf("datachain_BTC_clock\n"); //printf("datachain_BTC_clock\n");
if ( (retval= datachain_eventadd(myinfo,ordered,&myinfo->dPoW.BTC,DATACHAIN_ISBTC,0)) < 0 ) if ( (retval= datachain_eventadd(myinfo,ordered,&myinfo->dPoW.BTC,DATACHAIN_ISBTC,0)) < 0 )
{ {
myinfo->dPoW.BTC.numevents = datachain_events_rewind(myinfo,ordered,&myinfo->dPoW.BTC,height,hdrsi,unspentind); myinfo->dPoW.BTC.numevents = datachain_events_rewind(myinfo,ordered,&myinfo->dPoW.BTC,height,hdrsi,unspentind);
@ -230,7 +230,7 @@ void datachain_opreturn(struct supernet_info *myinfo,int32_t ordered,struct igua
uint32_t hdrsi,unspentind; struct datachain_event *event; uint32_t hdrsi,unspentind; struct datachain_event *event;
hdrsi = (uint32_t)(hdrsi_unspentind >> 32); hdrsi = (uint32_t)(hdrsi_unspentind >> 32);
unspentind = (uint32_t)hdrsi_unspentind; unspentind = (uint32_t)hdrsi_unspentind;
printf("datachain_opreturn\n"); //printf("datachain_opreturn\n");
if ( btc_or_btcd == DATACHAIN_ISBTC ) // BTC if ( btc_or_btcd == DATACHAIN_ISBTC ) // BTC
{ {
if ( opreturn == 0 ) if ( opreturn == 0 )
@ -273,7 +273,7 @@ void datachain_opreturn(struct supernet_info *myinfo,int32_t ordered,struct igua
int32_t iguana_opreturn(struct supernet_info *myinfo,int32_t ordered,struct iguana_info *coin,uint32_t timestamp,struct iguana_bundle *bp,int64_t crypto777_payment,int32_t height,uint64_t hdrsi_unspentind,int64_t burned,uint32_t fileid,uint64_t scriptpos,uint32_t scriptlen) int32_t iguana_opreturn(struct supernet_info *myinfo,int32_t ordered,struct iguana_info *coin,uint32_t timestamp,struct iguana_bundle *bp,int64_t crypto777_payment,int32_t height,uint64_t hdrsi_unspentind,int64_t burned,uint32_t fileid,uint64_t scriptpos,uint32_t scriptlen)
{ {
uint8_t type,scriptspace[IGUANA_MAXSCRIPTSIZE],opreturn[8192]; char fname[1024]; uint32_t oplen=0; int32_t btc_or_btcd=0,len = -1; struct vin_info V; uint8_t type,scriptspace[IGUANA_MAXSCRIPTSIZE],opreturn[8192]; char fname[1024]; uint32_t oplen=0; int32_t btc_or_btcd=0,len = -1; struct vin_info V;
printf("iguana_opreturn\n"); //printf("iguana_opreturn\n");
if ( strcmp("BTC",coin->symbol) == 0 ) if ( strcmp("BTC",coin->symbol) == 0 )
btc_or_btcd = DATACHAIN_ISBTC; btc_or_btcd = DATACHAIN_ISBTC;
else if ( strcmp("BTCD",coin->symbol) == 0 ) else if ( strcmp("BTCD",coin->symbol) == 0 )

2
iguana/iguana777.c

@ -895,7 +895,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
if ( coin->MAXMEM == 0 ) if ( coin->MAXMEM == 0 )
coin->MAXMEM = IGUANA_DEFAULTRAM; coin->MAXMEM = IGUANA_DEFAULTRAM;
coin->MAXMEM *= (1024L * 1024 * 1024); coin->MAXMEM *= (1024L * 1024 * 1024);
coin->enableCACHE = (strcmp("BTCD",coin->symbol) == 0); coin->enableCACHE = 0;//(strcmp("BTCD",coin->symbol) == 0);
if ( jobj(json,"cache") != 0 ) if ( jobj(json,"cache") != 0 )
coin->enableCACHE = juint(json,"cache"); coin->enableCACHE = juint(json,"cache");
if ( (coin->polltimeout= juint(json,"poll")) <= 0 ) if ( (coin->polltimeout= juint(json,"poll")) <= 0 )

2
iguana/iguana_blocks.c

@ -339,7 +339,7 @@ int32_t iguana_blockvalidate(struct iguana_info *coin,int32_t *validp,struct igu
if ( dispflag != 0 ) if ( dispflag != 0 )
{ {
static uint32_t counter; static uint32_t counter;
if ( (counter++ % 1000) == 999 ) if ( (counter++ % 10000) == 9999 )
printf("iguana_blockvalidate: %s miscompare.%d (%s) vs (%s)\n",coin->symbol,counter,bits256_str(str,hash2),bits256_str(str2,block->RO.hash2)); printf("iguana_blockvalidate: %s miscompare.%d (%s) vs (%s)\n",coin->symbol,counter,bits256_str(str,hash2),bits256_str(str2,block->RO.hash2));
//getchar(); //getchar();
} }

Loading…
Cancel
Save