Commit a2ebe0bb authored by vipwzw's avatar vipwzw

fix linter

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