Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
84035113d5
  1. 2
      iguana/iguana777.c
  2. 18
      iguana/iguana_init.c

2
iguana/iguana777.c

@ -891,7 +891,7 @@ struct iguana_info *iguana_setcoin(struct supernet_info *myinfo,char *symbol,voi
strcpy(coin->name,"illegalcoin"); strcpy(coin->name,"illegalcoin");
coin->symbol[0] = 0; coin->symbol[0] = 0;
return(0); return(0);
} else iguana_chainparms(coin->chain,json); } //else iguana_chainparms(coin->chain,json);
if ( jobj(json,"RELAY") != 0 ) if ( jobj(json,"RELAY") != 0 )
coin->RELAYNODE = juint(json,"RELAY"); coin->RELAYNODE = juint(json,"RELAY");
else coin->RELAYNODE = (strcmp(coin->symbol,"BTCD") == 0); else coin->RELAYNODE = (strcmp(coin->symbol,"BTCD") == 0);

18
iguana/iguana_init.c

@ -514,15 +514,6 @@ struct iguana_info *iguana_coinstart(struct iguana_info *coin,int32_t initialhei
} }
//coin->firstblock = coin->blocks.parsedblocks + 1; //coin->firstblock = coin->blocks.parsedblocks + 1;
iguana_genesis(coin,coin->chain); iguana_genesis(coin,coin->chain);
int32_t bundlei = -2;
static const bits256 zero;
iguana_bundlecreate(coin,&bundlei,0,*(bits256 *)coin->chain->genesis_hashdata,zero,1);
_iguana_chainlink(coin,iguana_blockfind("genesis",coin,*(bits256 *)coin->chain->genesis_hashdata));
if ( coin->blocks.hwmchain.height != 0 || memcmp(coin->blocks.hwmchain.RO.hash2.bytes,coin->chain->genesis_hashdata,sizeof(coin->chain->genesis_hashdata)) != 0 )
{
char str[65]; printf("%s genesis values mismatch hwmheight.%d %.15f %.15f %s\n",coin->name,coin->blocks.hwmchain.height,coin->blocks.hwmchain.PoW,coin->blocks.hwmchain.PoW,bits256_str(str,coin->blocks.hwmchain.RO.hash2));
getchar();
}
memset(&lastbundle,0,sizeof(lastbundle)); memset(&lastbundle,0,sizeof(lastbundle));
if ( coin->peers == 0 ) if ( coin->peers == 0 )
iter = 2; iter = 2;
@ -595,6 +586,15 @@ struct iguana_info *iguana_coinstart(struct iguana_info *coin,int32_t initialhei
fclose(fp); fclose(fp);
} else fpos = -1; } else fpos = -1;
} }
int32_t bundlei = -2;
static const bits256 zero;
iguana_bundlecreate(coin,&bundlei,0,*(bits256 *)coin->chain->genesis_hashdata,zero,1);
_iguana_chainlink(coin,iguana_blockfind("genesis",coin,*(bits256 *)coin->chain->genesis_hashdata));
if ( coin->blocks.hwmchain.height != 0 || memcmp(coin->blocks.hwmchain.RO.hash2.bytes,coin->chain->genesis_hashdata,sizeof(coin->chain->genesis_hashdata)) != 0 )
{
char str[65]; printf("%s genesis values mismatch hwmheight.%d %.15f %.15f %s\n",coin->name,coin->blocks.hwmchain.height,coin->blocks.hwmchain.PoW,coin->blocks.hwmchain.PoW,bits256_str(str,coin->blocks.hwmchain.RO.hash2));
getchar();
}
#ifndef IGUANA_DEDICATED_THREADS #ifndef IGUANA_DEDICATED_THREADS
coin->peers->peersloop = iguana_launch("peersloop",iguana_peersloop,coin,IGUANA_PERMTHREAD); coin->peers->peersloop = iguana_launch("peersloop",iguana_peersloop,coin,IGUANA_PERMTHREAD);
#endif #endif

Loading…
Cancel
Save