aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_makers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/chain_makers_test.go')
-rw-r--r--core/chain_makers_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go
index 5fc255c71..b297e671e 100644
--- a/core/chain_makers_test.go
+++ b/core/chain_makers_test.go
@@ -41,13 +41,16 @@ func ExampleGenerateChain() {
db, _ = ethdb.NewMemDatabase()
)
+ chainConfig := &params.ChainConfig{
+ HomesteadBlock: new(big.Int),
+ }
// Ensure that key1 has some funds in the genesis block.
genesis := WriteGenesisBlockForTesting(db, GenesisAccount{addr1, big.NewInt(1000000)})
// This call generates a chain of 5 blocks. The function runs for
// each block and adds different features to gen based on the
// block index.
- chain, _ := GenerateChain(nil, genesis, db, 5, func(i int, gen *BlockGen) {
+ chain, _ := GenerateChain(chainConfig, genesis, db, 5, func(i int, gen *BlockGen) {
switch i {
case 0:
// In block 1, addr1 sends addr2 some ether.
@@ -77,7 +80,7 @@ func ExampleGenerateChain() {
// Import the chain. This runs all block validation rules.
evmux := &event.TypeMux{}
- blockchain, _ := NewBlockChain(db, MakeChainConfig(), FakePow{}, evmux)
+ blockchain, _ := NewBlockChain(db, chainConfig, FakePow{}, evmux)
if i, err := blockchain.InsertChain(chain); err != nil {
fmt.Printf("insert error (block %d): %v\n", chain[i].NumberU64(), err)
return