aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-04-02 05:37:17 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-04-02 05:37:17 +0800
commit219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be (patch)
treea27922e01862131c998db6a93fd42ddb7a8247e9 /core/genesis.go
parentab5c007376e36cde14cdb060ad4786f016c713d4 (diff)
parentc26c8d3a44cdd45994b6d99777d620565bab8f9c (diff)
downloadgo-tangerine-219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be.tar
go-tangerine-219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be.tar.gz
go-tangerine-219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be.tar.bz2
go-tangerine-219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be.tar.lz
go-tangerine-219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be.tar.xz
go-tangerine-219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be.tar.zst
go-tangerine-219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be.zip
Merge pull request #623 from Gustav-Simonsson/read_protocol_values_from_common_params
Read most protocol params from common/params.json
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/genesis.go b/core/genesis.go
index 7958157a4..13656c40c 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -3,12 +3,12 @@ package core
import (
"encoding/json"
"fmt"
- "math/big"
"os"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
+ "github.com/ethereum/go-ethereum/params"
)
/*
@@ -18,13 +18,11 @@ import (
var ZeroHash256 = make([]byte, 32)
var ZeroHash160 = make([]byte, 20)
var ZeroHash512 = make([]byte, 64)
-var GenesisDiff = big.NewInt(131072)
-var GenesisGasLimit = big.NewInt(3141592)
func GenesisBlock(db common.Database) *types.Block {
- genesis := types.NewBlock(common.Hash{}, common.Address{}, common.Hash{}, GenesisDiff, 42, "")
+ genesis := types.NewBlock(common.Hash{}, common.Address{}, common.Hash{}, params.GenesisDifficulty, 42, "")
genesis.Header().Number = common.Big0
- genesis.Header().GasLimit = GenesisGasLimit
+ genesis.Header().GasLimit = params.GenesisGasLimit
genesis.Header().GasUsed = common.Big0
genesis.Header().Time = 0