From 0b20500d5484aaf211b76781d06ad61b1b4682a3 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Thu, 10 May 2018 11:52:57 -0400 Subject: [PATCH] cleaned up changes --- core/genesis.go | 13 ------------- eth/backend.go | 12 +++--------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index 1095ed82b5..387a10f977 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -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 { diff --git a/eth/backend.go b/eth/backend.go index e4b4703dd8..e4a34c46b0 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -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,