@@ -22,6 +22,7 @@ import (
22
22
"github.com/ethereum/go-ethereum/common"
23
23
"github.com/ethereum/go-ethereum/core/state"
24
24
"github.com/ethereum/go-ethereum/core/types"
25
+ "github.com/ethereum/go-ethereum/ethdb"
25
26
"github.com/ethereum/go-ethereum/event"
26
27
"github.com/ethereum/go-ethereum/pow"
27
28
)
@@ -142,7 +143,7 @@ func (b *BlockGen) PrevBlock(index int) *types.Block {
142
143
// Blocks created by GenerateChain do not contain valid proof of work
143
144
// values. Inserting them into ChainManager requires use of FakePow or
144
145
// 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 {
146
147
statedb := state .New (parent .Root (), db )
147
148
blocks := make (types.Blocks , n )
148
149
genblock := func (i int , h * types.Header ) * types.Block {
@@ -185,7 +186,7 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header {
185
186
186
187
// newCanonical creates a new deterministic canonical chain by running
187
188
// 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 ) {
189
190
evmux := & event.TypeMux {}
190
191
191
192
WriteTestNetGenesisBlock (db , 0 )
@@ -201,7 +202,7 @@ func newCanonical(n int, db common.Database) (*BlockProcessor, error) {
201
202
return bman , err
202
203
}
203
204
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 {
205
206
return GenerateChain (parent , db , n , func (i int , b * BlockGen ) {
206
207
b .SetCoinbase (common.Address {0 : byte (seed ), 19 : byte (i )})
207
208
})
0 commit comments