@@ -22,6 +22,7 @@ import (
2222 "github.com/ethereum/go-ethereum/common"
2323 "github.com/ethereum/go-ethereum/core/state"
2424 "github.com/ethereum/go-ethereum/core/types"
25+ "github.com/ethereum/go-ethereum/ethdb"
2526 "github.com/ethereum/go-ethereum/event"
2627 "github.com/ethereum/go-ethereum/pow"
2728)
@@ -142,7 +143,7 @@ func (b *BlockGen) PrevBlock(index int) *types.Block {
142143// Blocks created by GenerateChain do not contain valid proof of work
143144// values. Inserting them into ChainManager requires use of FakePow or
144145// a similar non-validating proof of work implementation.
145- func GenerateChain (parent * types.Block , db common .Database , n int , gen func (int , * BlockGen )) []* types.Block {
146+ func GenerateChain (parent * types.Block , db ethdb .Database , n int , gen func (int , * BlockGen )) []* types.Block {
146147 statedb := state .New (parent .Root (), db )
147148 blocks := make (types.Blocks , n )
148149 genblock := func (i int , h * types.Header ) * types.Block {
@@ -185,7 +186,7 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header {
185186
186187// newCanonical creates a new deterministic canonical chain by running
187188// InsertChain on the result of makeChain.
188- func newCanonical (n int , db common .Database ) (* BlockProcessor , error ) {
189+ func newCanonical (n int , db ethdb .Database ) (* BlockProcessor , error ) {
189190 evmux := & event.TypeMux {}
190191
191192 WriteTestNetGenesisBlock (db , 0 )
@@ -201,7 +202,7 @@ func newCanonical(n int, db common.Database) (*BlockProcessor, error) {
201202 return bman , err
202203}
203204
204- func makeChain (parent * types.Block , n int , db common .Database , seed int ) []* types.Block {
205+ func makeChain (parent * types.Block , n int , db ethdb .Database , seed int ) []* types.Block {
205206 return GenerateChain (parent , db , n , func (i int , b * BlockGen ) {
206207 b .SetCoinbase (common.Address {0 : byte (seed ), 19 : byte (i )})
207208 })
0 commit comments