OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bug
[bytom/vapor.git]
/
test
/
bench_blockchain_test.go
diff --git
a/test/bench_blockchain_test.go
b/test/bench_blockchain_test.go
index
8ccb36b
..
d3827f2
100644
(file)
--- a/
test/bench_blockchain_test.go
+++ b/
test/bench_blockchain_test.go
@@
-13,10
+13,7
@@
import (
"github.com/vapor/blockchain/pseudohsm"
"github.com/vapor/blockchain/signers"
"github.com/vapor/blockchain/txbuilder"
"github.com/vapor/blockchain/pseudohsm"
"github.com/vapor/blockchain/signers"
"github.com/vapor/blockchain/txbuilder"
- "github.com/vapor/config"
"github.com/vapor/consensus"
"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/database/storage"
"github.com/vapor/crypto/ed25519/chainkd"
"github.com/vapor/database/leveldb"
"github.com/vapor/database/storage"
@@
-139,15
+136,10
@@
func GenerateChainData(dirPath string, testDB dbm.DB, txNumber, otherAssetNum in
if err := SetUtxoView(testDB, utxoView); err != nil {
return nil, nil, nil, err
}
if err := SetUtxoView(testDB, utxoView); err != nil {
return nil, nil, nil, err
}
- var engine engine.Engine
- switch config.CommonConfig.Consensus.Type {
- case "dpos":
- engine = dpos.GDpos
- }
store := leveldb.NewStore(testDB)
txPool := protocol.NewTxPool(store)
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, nil, nil, err
}
if err != nil {
return nil, nil, nil, err
}
@@
-164,7
+156,7
@@
func InsertChain(chain *protocol.Chain, txPool *protocol.TxPool, txs []*types.Tx
}
}
}
}
- block, err := mining.NewBlockTemplate(chain, txPool, nil, nil, nil)
+ block, err := mining.NewBlockTemplate(chain, txPool, nil, nil, nil
, uint64(time.Now().Unix())
)
if err != nil {
return err
}
if err != nil {
return err
}