aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go23
1 files changed, 14 insertions, 9 deletions
diff --git a/core/genesis.go b/core/genesis.go
index d8c6e9cea..5c69b216c 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -43,15 +43,16 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block,
}
var genesis struct {
- Nonce string
- Timestamp string
- ParentHash string
- ExtraData string
- GasLimit string
- Difficulty string
- Mixhash string
- Coinbase string
- Alloc map[string]struct {
+ ChainConfig *ChainConfig
+ Nonce string
+ Timestamp string
+ ParentHash string
+ ExtraData string
+ GasLimit string
+ Difficulty string
+ Mixhash string
+ Coinbase string
+ Alloc map[string]struct {
Code string
Storage map[string]string
Balance string
@@ -114,6 +115,10 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block,
if err := WriteHeadBlockHash(chainDb, block.Hash()); err != nil {
return nil, err
}
+ if err := WriteChainConfig(chainDb, block.Hash(), genesis.ChainConfig); err != nil {
+ return nil, err
+ }
+
return block, nil
}