aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-11-14 17:52:02 +0800
committerGitHub <noreply@github.com>2016-11-14 17:52:02 +0800
commitca73dea3b9bcdf3b5424b5c48c70817439e2e304 (patch)
tree670e2833878e72555644fbbd81db6c5a1b44493f /core/genesis.go
parent21701190ac0a838e347f31b7a918bb0a60c1e8c1 (diff)
parent648bd22427000b6e20a5e1a9c397005aa1ad4f9b (diff)
downloaddexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.gz
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.bz2
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.lz
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.xz
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.zst
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.zip
Merge pull request #3179 from obscuren/eip-158
EIP158 & 160 Hardfork
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/genesis.go b/core/genesis.go
index 637b63320..8509f664d 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -43,7 +43,7 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block,
}
var genesis struct {
- ChainConfig *ChainConfig `json:"config"`
+ ChainConfig *params.ChainConfig `json:"config"`
Nonce string
Timestamp string
ParentHash string
@@ -73,7 +73,7 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block,
statedb.SetState(address, common.HexToHash(key), common.HexToHash(value))
}
}
- root, stateBatch := statedb.CommitBatch()
+ root, stateBatch := statedb.CommitBatch(false)
difficulty := common.String2Big(genesis.Difficulty)
block := types.NewBlock(&types.Header{
@@ -128,7 +128,7 @@ func GenesisBlockForTesting(db ethdb.Database, addr common.Address, balance *big
statedb, _ := state.New(common.Hash{}, db)
obj := statedb.GetOrNewStateObject(addr)
obj.SetBalance(balance)
- root, err := statedb.Commit()
+ root, err := statedb.Commit(false)
if err != nil {
panic(fmt.Sprintf("cannot write state: %v", err))
}