Browse Source

test

etomic
jl777 8 years ago
parent
commit
72dd7a41e9
  1. 2
      gecko/gecko.c
  2. 18
      iguana/iguana777.c

2
gecko/gecko.c

@ -180,6 +180,8 @@ struct iguana_info *basilisk_geckochain(struct supernet_info *myinfo,char *symbo
virt->enableCACHE = 1;
serialized = get_dataptr(BASILISK_HDROFFSET,&ptr,&datalen,hexbuf,sizeof(hexbuf),hexstr);
iguana_chaininit(myinfo,virt->chain,1,valsobj);
if ( virt->FULLNODE >= 0 )
virt->chain->userpass[0] = 0;
virt->chain->isPoS = 1;
hdrsize = (virt->chain->zcash != 0) ? sizeof(struct iguana_msgzblockhdr) : sizeof(struct iguana_msgblockhdr);
if ( gecko_blocknonce_verify(virt,serialized,hdrsize,virt->chain->nBits,0,0) > 0 )

18
iguana/iguana777.c

@ -58,6 +58,8 @@ struct iguana_info *iguana_coinadd(char *symbol,char *name,cJSON *argjson,int32_
else
{
coin->chain = iguana_chainfind(myinfo,(char *)symbol,argjson,1);
if ( coin->FULLNODE >= 0 )
coin->chain->userpass[0] = 0;
coin->peers = calloc(1,sizeof(*coin->peers));
for (j=0; j<IGUANA_MAXPEERS; j++)
{
@ -1144,13 +1146,6 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
coin->active = juint(json,"active");
if ( (coin->minconfirms= minconfirms) == 0 )
coin->minconfirms = (strcmp(symbol,"BTC") == 0) ? 3 : 10;
if ( coin->chain == 0 && (coin->chain= iguana_createchain(json)) == 0 )
{
printf("cant initialize chain.(%s)\n",jstr(json,0));
strcpy(coin->name,"illegalcoin");
coin->symbol[0] = 0;
return(0);
}
if ( jobj(json,"RELAY") != 0 )
coin->FULLNODE = jint(json,"RELAY");
else coin->FULLNODE = (strcmp(coin->symbol,"BTCD") == 0);
@ -1159,6 +1154,15 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
else coin->VALIDATENODE = (strcmp(coin->symbol,"BTCD") == 0);
if ( coin->VALIDATENODE > 0 || coin->FULLNODE > 0 )
SuperNET_MYINFO(0)->IAMRELAY++;
if ( coin->chain == 0 && (coin->chain= iguana_createchain(json)) == 0 )
{
printf("cant initialize chain.(%s)\n",jstr(json,0));
strcpy(coin->name,"illegalcoin");
if ( coin->FULLNODE >= 0 )
coin->chain->userpass[0] = 0;
coin->symbol[0] = 0;
return(0);
}
#ifdef __PNACL
coin->VALIDATENODE = coin->FULLNODE = 0;
#endif

Loading…
Cancel
Save