From 5f8888e11606296c9582496974c0f6b96a882146 Mon Sep 17 00:00:00 2001 From: gary rong Date: Fri, 22 Dec 2017 20:37:50 +0800 Subject: accounts, consensus, core, eth: make chain maker consensus agnostic (#15497) * accounts, consensus, core, eth: make chain maker consensus agnostic * consensus, core: move CalcDifficulty to Engine interface * consensus: add docs for calcDifficulty function * consensus, core: minor comment fixups --- eth/fetcher/fetcher_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'eth/fetcher') diff --git a/eth/fetcher/fetcher_test.go b/eth/fetcher/fetcher_test.go index 9889e6cc5..e6a639417 100644 --- a/eth/fetcher/fetcher_test.go +++ b/eth/fetcher/fetcher_test.go @@ -25,6 +25,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" @@ -45,7 +46,7 @@ var ( // contains a transaction and every 5th an uncle to allow testing correct block // reassembly. func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common.Hash]*types.Block) { - blocks, _ := core.GenerateChain(params.TestChainConfig, parent, testdb, n, func(i int, block *core.BlockGen) { + blocks, _ := core.GenerateChain(params.TestChainConfig, parent, ethash.NewFaker(), testdb, n, func(i int, block *core.BlockGen) { block.SetCoinbase(common.Address{seed}) // If the block number is multiple of 3, send a bonus transaction to the miner -- cgit v1.2.3