cleaned up changes

This commit is contained in:
Dustin Brickwood 2018-05-10 11:52:57 -04:00
parent af59e6aa54
commit 0b20500d54
2 changed files with 3 additions and 22 deletions

View file

@ -74,7 +74,6 @@ func (ga *GenesisAlloc) UnmarshalJSON(data []byte) error {
*ga = make(GenesisAlloc)
for addr, a := range m {
(*ga)[common.Address(addr)] = a
fmt.Println("GENESIS +++++++++", a)
}
return nil
}
@ -377,18 +376,6 @@ func DefaultRinkebyGenesisBlock() *Genesis {
Alloc: decodePrealloc(rinkebyAllocData),
}
}
// DefaultShyftGenesisBlock returns the Shyft network genesis block.
func DefaultShyftGenesisBlock() *Genesis {
return &Genesis{
Config: params.ShyftNetworkChainConfig,
Timestamp: 1492009146,
ExtraData: hexutil.MustDecode("0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
GasLimit: 4700000,
Difficulty: big.NewInt(1),
Alloc: decodePrealloc(shyftAllocData),
}
}
// DeveloperGenesisBlock returns the 'geth --dev' genesis block. Note, this must
// be seeded with the
func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis {

View file

@ -105,8 +105,6 @@ func (s *Ethereum) AddLesServer(ls LesServer) {
// New creates a new Ethereum object (including the
// initialisation of the common Ethereum object)
func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
fmt.Println("check//////////")
if config.SyncMode == downloader.LightSync {
return nil, errors.New("can't run eth.Ethereum in light sync mode, use les.LightEthereum")
}
@ -118,25 +116,21 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
return nil, err
}
//for k, v := range &config.Genesis.Alloc {
// fmt.Printf("key[%s] value[%s]\n", k, v)
//}
// @NOTE:shyft instantiate BlockExplorerDB here
// @TODO: Create Genesis Block
// @NOTE:shyft instantiate BlockExplorerDB here?
connStr := "user=postgres dbname=shyftdb sslmode=disable"
blockExplorerDb, err := sql.Open("postgres", connStr)
if err != nil {
return nil, err
}
stopDbUpgrade := upgradeDeduplicateData(chainDb)
chainConfig, genesisHash, genesisErr := core.SetupGenesisBlock(chainDb, config.Genesis, blockExplorerDb)
//core.SetupShyftGenesisBlock(blockExplorerDb, config.Genesis)
if _, ok := genesisErr.(*params.ConfigCompatError); genesisErr != nil && !ok {
return nil, genesisErr
}
log.Info("Initialised chain configuration", "config", chainConfig)
fmt.Println(config.GasPrice)
eth := &Ethereum{
config: config,
chainDb: chainDb,