Commit a42e40e2 authored by madengji's avatar madengji Committed by vipwzw

fix dpos ut

parent 22035962
......@@ -559,6 +559,8 @@ func initEnvDpos1(configName string) (queue.Queue, *blockchain.BlockChain, queue
q.SetConfig(chain33Cfg)
cfg := chain33Cfg.GetModuleConfig()
sub := chain33Cfg.GetSubConfig()
rpc.InitCfg(cfg.RPC)
chain := blockchain.New(chain33Cfg)
chain.SetQueueClient(q.Client())
......@@ -578,7 +580,6 @@ func initEnvDpos1(configName string) (queue.Queue, *blockchain.BlockChain, queue
network.SetQueueClient(q.Client())
rpc.InitCfg(cfg.RPC)
gapi := rpc.NewGRpcServer(q.Client(), nil)
go gapi.Listen()
......
......@@ -18,9 +18,11 @@ func TestParaNode(t *testing.T) {
defer para.Close()
//通过rpc 发生信息
tx := util.CreateTxWithExecer(paraCfg, para.Para.GetGenesisKey(), "user.p.test.none")
assert.NotNil(t, tx)
para.Para.SendTxRPC(tx)
para.Para.WaitHeight(1)
tx = util.CreateTxWithExecer(paraCfg, para.Para.GetGenesisKey(), "user.p.test.none")
assert.NotNil(t, tx)
para.Para.SendTxRPC(tx)
para.Para.WaitHeight(2)
......
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