diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-11-16 23:58:24 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-02-19 16:53:47 +0800 |
commit | 2072c26a96badbe45d6df56a4cd68ffd1b6fb12e (patch) | |
tree | 8dbd7ffdecc723250f439faf32bb08da2ce27bf0 /core/genesis.go | |
parent | 4da209290831720b0f61754b92dabefd5cb35b6d (diff) | |
download | dexon-2072c26a96badbe45d6df56a4cd68ffd1b6fb12e.tar.gz dexon-2072c26a96badbe45d6df56a4cd68ffd1b6fb12e.tar.zst dexon-2072c26a96badbe45d6df56a4cd68ffd1b6fb12e.zip |
cmd, core, params: add support for Goerli
(cherry picked from commit b0ed083ead2d58cc25754eacdb48046eb2bc81cb)
Diffstat (limited to 'core/genesis.go')
-rw-r--r-- | core/genesis.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/genesis.go b/core/genesis.go index 62cde87b5..cbb6eecd2 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -157,7 +157,6 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, constant if genesis != nil && genesis.Config == nil { return params.AllEthashProtocolChanges, common.Hash{}, errGenesisNoConfig } - // Just commit the new block if there is no stored genesis block. stored := rawdb.ReadCanonicalHash(db, 0) if (stored == common.Hash{}) { @@ -340,6 +339,18 @@ func DefaultRinkebyGenesisBlock() *Genesis { } } +// DefaultGoerliGenesisBlock returns the Görli network genesis block. +func DefaultGoerliGenesisBlock() *Genesis { + return &Genesis{ + Config: params.GoerliChainConfig, + Timestamp: 1548854791, + ExtraData: hexutil.MustDecode("0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), + GasLimit: 10485760, + Difficulty: big.NewInt(1), + Alloc: decodePrealloc(goerliAllocData), + } +} + // DeveloperGenesisBlock returns the 'geth --dev' genesis block. Note, this must // be seeded with the func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis { |