aboutsummaryrefslogtreecommitdiffstats
path: root/tests/block_test_util.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-10 20:29:40 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-10 23:37:41 +0800
commita32c51effda8682b292d04863aae7811f78abf7e (patch)
treed721822cc10c929d5a2def0865c366e085ef99be /tests/block_test_util.go
parent5a810758dbe75dce9537d464ac0e5b5385b0e78f (diff)
downloaddexon-a32c51effda8682b292d04863aae7811f78abf7e.tar.gz
dexon-a32c51effda8682b292d04863aae7811f78abf7e.tar.zst
dexon-a32c51effda8682b292d04863aae7811f78abf7e.zip
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.
Diffstat (limited to 'tests/block_test_util.go')
-rw-r--r--tests/block_test_util.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go
index e624cced0..f7c2208b3 100644
--- a/tests/block_test_util.go
+++ b/tests/block_test_util.go
@@ -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 {