OSDN Git Service

fix bug
[bytom/vapor.git] / asset / asset_test.go
index fe85e21..33b1445 100644 (file)
@@ -14,8 +14,6 @@ import (
        "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"
@@ -155,14 +153,9 @@ func TestListAssets(t *testing.T) {
 }
 
 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
        }