cmd, core, eth, common: genesis preparation

Implemented the --genesis flag thru which we can set a custom genesis
block, including the official Ethereum genesis block.
This commit is contained in:
Jeffrey Wilcke
2015-07-10 14:29:40 +02:00
parent 5a810758db
commit a32c51effd
15 changed files with 244 additions and 138 deletions

View File

@ -160,6 +160,8 @@ func runBlockTests(bt map[string]*BlockTest, skipTests []string) error {
}
func runBlockTest(test *BlockTest) error {
cfg := test.makeEthConfig()
cfg.GenesisBlock = test.Genesis
ethereum, err := eth.New(cfg)
if err != nil {
return err
@ -170,9 +172,6 @@ func runBlockTest(test *BlockTest) error {
return err
}
// import the genesis block
ethereum.ResetWithGenesisBlock(test.Genesis)
// import pre accounts
statedb, err := test.InsertPreState(ethereum)
if err != nil {