diff options
author | gary rong <garyrong0905@gmail.com> | 2017-12-22 20:37:50 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-12-22 20:37:50 +0800 |
commit | 5f8888e11606296c9582496974c0f6b96a882146 (patch) | |
tree | ef8139ff20ae33eb5a236290d5107dd808e34340 /eth/downloader | |
parent | 9dbb8ef4aadb8e40aef8b681cf86acd20789abdc (diff) | |
download | dexon-5f8888e11606296c9582496974c0f6b96a882146.tar dexon-5f8888e11606296c9582496974c0f6b96a882146.tar.gz dexon-5f8888e11606296c9582496974c0f6b96a882146.tar.bz2 dexon-5f8888e11606296c9582496974c0f6b96a882146.tar.lz dexon-5f8888e11606296c9582496974c0f6b96a882146.tar.xz dexon-5f8888e11606296c9582496974c0f6b96a882146.tar.zst dexon-5f8888e11606296c9582496974c0f6b96a882146.zip |
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
Diffstat (limited to 'eth/downloader')
-rw-r--r-- | eth/downloader/downloader_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 7d1cc8c34..e14264944 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -26,6 +26,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/state" "github.com/ethereum/go-ethereum/core/types" @@ -107,7 +108,7 @@ func newTester() *downloadTester { // reassembly. func (dl *downloadTester) makeChain(n int, seed byte, parent *types.Block, parentReceipts types.Receipts, heavy bool) ([]common.Hash, map[common.Hash]*types.Header, map[common.Hash]*types.Block, map[common.Hash]types.Receipts) { // Generate the block chain - blocks, receipts := core.GenerateChain(params.TestChainConfig, parent, dl.peerDb, n, func(i int, block *core.BlockGen) { + blocks, receipts := core.GenerateChain(params.TestChainConfig, parent, ethash.NewFaker(), dl.peerDb, n, func(i int, block *core.BlockGen) { block.SetCoinbase(common.Address{seed}) // If a heavy chain is requested, delay blocks to raise difficulty |