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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user