Commit 1515e456 authored by vipwzw's avatar vipwzw Committed by 33cn

auto ci

parent 5e1089b0
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
package para package para
import ( import (
"testing"
"errors" "errors"
"testing"
"github.com/33cn/chain33/blockchain" "github.com/33cn/chain33/blockchain"
"github.com/33cn/chain33/common/log" "github.com/33cn/chain33/common/log"
"github.com/33cn/chain33/executor" "github.com/33cn/chain33/executor"
...@@ -41,8 +42,6 @@ type suiteParaClient struct { ...@@ -41,8 +42,6 @@ type suiteParaClient struct {
network *p2p.P2p network *p2p.P2p
} }
func (s *suiteParaClient) initEnv(cfg *types.Config, sub *types.ConfigSubModule) { func (s *suiteParaClient) initEnv(cfg *types.Config, sub *types.ConfigSubModule) {
q := queue.New("channel") q := queue.New("channel")
s.q = q s.q = q
...@@ -64,10 +63,8 @@ func (s *suiteParaClient) initEnv(cfg *types.Config, sub *types.ConfigSubModule) ...@@ -64,10 +63,8 @@ func (s *suiteParaClient) initEnv(cfg *types.Config, sub *types.ConfigSubModule)
s.para = New(cfg.Consensus, sub.Consensus["para"]).(*client) s.para = New(cfg.Consensus, sub.Consensus["para"]).(*client)
s.grpcCli = &typesmocks.Chain33Client{} s.grpcCli = &typesmocks.Chain33Client{}
s.createBlockMock() s.createBlockMock()
reply := &types.Reply{IsOk: true} reply := &types.Reply{IsOk: true}
s.grpcCli.On("IsSync", mock.Anything, mock.Anything).Return(reply, nil) s.grpcCli.On("IsSync", mock.Anything, mock.Anything).Return(reply, nil)
result := &pt.ParacrossStatus{Height: -1} result := &pt.ParacrossStatus{Height: -1}
...@@ -93,10 +90,10 @@ func (s *suiteParaClient) initEnv(cfg *types.Config, sub *types.ConfigSubModule) ...@@ -93,10 +90,10 @@ func (s *suiteParaClient) initEnv(cfg *types.Config, sub *types.ConfigSubModule)
func (s *suiteParaClient) createBlockMock() { func (s *suiteParaClient) createBlockMock() {
var i, hashdata int64 var i, hashdata int64
for i=0; i<3;i++{ for i = 0; i < 3; i++ {
hashdata = i hashdata = i
if i>0{ if i > 0 {
hashdata = i-1 hashdata = i - 1
} }
block := &types.Block{ block := &types.Block{
......
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