Commit a2ebe0bb authored by vipwzw's avatar vipwzw

fix linter

parent e2d4fe05
......@@ -48,7 +48,7 @@ type suiteParaCommitMsg struct {
block *blockchain.BlockChain
exec *executor.Executor
store queue.Module
mem *mempool.Mempool
mem queue.Module
network *p2p.P2p
}
......@@ -84,17 +84,15 @@ func (s *suiteParaCommitMsg) initEnv(cfg *types.Config, sub *types.ConfigSubModu
s.para.grpcClient = s.grpcCli
s.para.SetQueueClient(q.Client())
s.mem = mempool.New(cfg.MemPool)
s.mem = mempool.New(cfg.Mempool, nil)
s.mem.SetQueueClient(q.Client())
s.mem.SetSync(true)
s.mem.WaitPollLastHeader()
s.mem.Wait()
s.network = p2p.New(cfg.P2P)
s.network.SetQueueClient(q.Client())
s.para.wg.Add(1)
go walletProcess(q, s.para)
}
func walletProcess(q queue.Queue, para *client) {
......
......@@ -51,6 +51,7 @@ verMix=118
verMax=119
[mempool]
name="timeline"
poolCacheSize=10240
minTxFee=100000
......
......@@ -62,14 +62,14 @@ func TestPbft(t *testing.T) {
clearTestData()
}
func initEnvPbft() (queue.Queue, *blockchain.BlockChain, *p2p.P2p, queue.Module, *mempool.Mempool, queue.Module, queue.Module, queue.Module) {
func initEnvPbft() (queue.Queue, *blockchain.BlockChain, *p2p.P2p, queue.Module, queue.Module, *executor.Executor, queue.Module, queue.Module) {
var q = queue.New("channel")
flag.Parse()
cfg, sub := types.InitCfg("chain33.test.toml")
types.Init(cfg.Title, cfg)
chain := blockchain.New(cfg.BlockChain)
chain.SetQueueClient(q.Client())
mem := mempool.New(cfg.MemPool)
mem := mempool.New(cfg.Mempool, nil)
mem.SetQueueClient(q.Client())
exec := executor.New(cfg.Exec, sub.Exec)
exec.SetQueueClient(q.Client())
......
......@@ -59,6 +59,7 @@ jrpcFuncWhitelist=["*"]
grpcFuncWhitelist=["*"]
[mempool]
name="timeline"
poolCacheSize=10240
minTxFee=100000
......
......@@ -63,7 +63,7 @@ func RaftPerf() {
sendReplyList(q)
}
func initEnvRaft() (queue.Queue, *blockchain.BlockChain, queue.Module, *mempool.Mempool, queue.Module, queue.Module, queue.Module) {
func initEnvRaft() (queue.Queue, *blockchain.BlockChain, queue.Module, queue.Module, *executor.Executor, queue.Module, queue.Module) {
var q = queue.New("channel")
flag.Parse()
cfg, sub := types.InitCfg("chain33.test.toml")
......@@ -80,7 +80,7 @@ func initEnvRaft() (queue.Queue, *blockchain.BlockChain, queue.Module, *mempool.
cs := NewRaftCluster(cfg.Consensus, sub.Consensus["raft"])
cs.SetQueueClient(q.Client())
mem := mempool.New(cfg.MemPool)
mem := mempool.New(cfg.Mempool, nil)
mem.SetQueueClient(q.Client())
network := p2p.New(cfg.P2P)
......
......@@ -60,6 +60,7 @@ jrpcFuncWhitelist=["*"]
grpcFuncWhitelist=["*"]
[mempool]
name="timeline"
poolCacheSize=10240
minTxFee=100000
......
......@@ -76,7 +76,7 @@ func RaftPerf() {
time.Sleep(10 * time.Second)
}
func initEnvTendermint() (queue.Queue, *blockchain.BlockChain, queue.Module, *mempool.Mempool, queue.Module, queue.Module, queue.Module) {
func initEnvTendermint() (queue.Queue, *blockchain.BlockChain, queue.Module, queue.Module, *executor.Executor, queue.Module, queue.Module) {
var q = queue.New("channel")
flag.Parse()
cfg, sub := types.InitCfg("chain33.test.toml")
......@@ -93,7 +93,7 @@ func initEnvTendermint() (queue.Queue, *blockchain.BlockChain, queue.Module, *me
cs := New(cfg.Consensus, sub.Consensus["tendermint"])
cs.SetQueueClient(q.Client())
mem := mempool.New(cfg.MemPool)
mem := mempool.New(cfg.Mempool, nil)
mem.SetQueueClient(q.Client())
network := p2p.New(cfg.P2P)
......
......@@ -60,6 +60,7 @@ jrpcFuncWhitelist=["*"]
grpcFuncWhitelist=["*"]
[mempool]
name="timeline"
poolCacheSize=10240
minTxFee=100000
maxTxNumPerAccount=10000
......
......@@ -62,6 +62,7 @@ grpcFuncWhitelist=["*"]
mainnetJrpcAddr= "http://localhost:8801"
[mempool]
name="timeline"
poolCacheSize=10240
minTxFee=100000
maxTxNumPerAccount=10000
......
......@@ -100,9 +100,8 @@ func (mock *testDataMock) initMember() {
if mock.mockMempool {
mock.mockMempoolProc(q)
} else {
mempool := mempool.New(cfg.MemPool)
mempool := mempool.New(cfg.Mempool, nil)
mempool.SetQueueClient(q.Client())
mempool.SetMinFee(1e5)
mock.modules = append(mock.modules, mempool)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment