"github.com/vapor/common"
"github.com/vapor/config"
"github.com/vapor/consensus"
- engine "github.com/vapor/consensus/consensus"
- "github.com/vapor/consensus/consensus/dpos"
"github.com/vapor/crypto/ed25519/chainkd"
"github.com/vapor/database/leveldb"
"github.com/vapor/protocol"
}
func mockChain(testDB dbm.DB) (*protocol.Chain, error) {
- var engine engine.Engine
- switch config.CommonConfig.Consensus.Type {
- case "dpos":
- engine = dpos.GDpos
- }
store := leveldb.NewStore(testDB)
txPool := protocol.NewTxPool(store)
- chain, err := protocol.NewChain(store, txPool, engine)
+ chain, err := protocol.NewChain(store, txPool)
if err != nil {
return nil, err
}