Commit 44c97cb0 authored by vipwzw's avatar vipwzw Committed by 33cn

auto ci

parent f5b13fa1
...@@ -38,14 +38,13 @@ func TestFilterTxsForPara(t *testing.T) { ...@@ -38,14 +38,13 @@ func TestFilterTxsForPara(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
//para cross tx group fail //para cross tx group fail
tx7, _ := createCrossParaTx("toA",1) tx7, _ := createCrossParaTx("toA", 1)
tx8, err := createCrossParaTx("toB", 8) tx8, err := createCrossParaTx("toB", 8)
assert.Nil(t, err) assert.Nil(t, err)
tx78 := []*types.Transaction{tx7, tx8} tx78 := []*types.Transaction{tx7, tx8}
txGroup78, err := createTxsGroup(tx78) txGroup78, err := createTxsGroup(tx78)
assert.Nil(t, err) assert.Nil(t, err)
//all para tx group //all para tx group
txB, err := createCrossParaTx("toB", 11) txB, err := createCrossParaTx("toB", 11)
assert.Nil(t, err) assert.Nil(t, err)
...@@ -69,7 +68,6 @@ func TestFilterTxsForPara(t *testing.T) { ...@@ -69,7 +68,6 @@ func TestFilterTxsForPara(t *testing.T) {
// t.Log("tx exec name", "i", i, "name", string(tx.Execer)) // t.Log("tx exec name", "i", i, "name", string(tx.Execer))
//} //}
recpt5 := &types.ReceiptData{Ty: types.ExecPack} recpt5 := &types.ReceiptData{Ty: types.ExecPack}
recpt6 := &types.ReceiptData{Ty: types.ExecPack} recpt6 := &types.ReceiptData{Ty: types.ExecPack}
...@@ -78,11 +76,10 @@ func TestFilterTxsForPara(t *testing.T) { ...@@ -78,11 +76,10 @@ func TestFilterTxsForPara(t *testing.T) {
recpt7 := &types.ReceiptData{Ty: types.ExecPack, Logs: logs} recpt7 := &types.ReceiptData{Ty: types.ExecPack, Logs: logs}
recpt8 := &types.ReceiptData{Ty: types.ExecPack} recpt8 := &types.ReceiptData{Ty: types.ExecPack}
recptB := &types.ReceiptData{Ty: types.ExecPack} recptB := &types.ReceiptData{Ty: types.ExecPack}
recptC := &types.ReceiptData{Ty: types.ExecPack} recptC := &types.ReceiptData{Ty: types.ExecPack}
recptD := &types.ReceiptData{Ty: types.ExecPack} recptD := &types.ReceiptData{Ty: types.ExecPack}
receipts := []*types.ReceiptData{ recpt5,recpt6, recpt7, recpt8, recptB, recptC, recptD} receipts := []*types.ReceiptData{recpt5, recpt6, recpt7, recpt8, recptB, recptC, recptD}
block := &types.Block{Txs: txs} block := &types.Block{Txs: txs}
detail := &types.BlockDetail{ detail := &types.BlockDetail{
...@@ -92,13 +89,11 @@ func TestFilterTxsForPara(t *testing.T) { ...@@ -92,13 +89,11 @@ func TestFilterTxsForPara(t *testing.T) {
para := &client{} para := &client{}
rst := para.FilterTxsForPara(detail) rst := para.FilterTxsForPara(detail)
filterTxs := []*types.Transaction{ tx5, tx6, tx7,tx8,txB, txC} filterTxs := []*types.Transaction{tx5, tx6, tx7, tx8, txB, txC}
assert.Equal(t, filterTxs, rst) assert.Equal(t, filterTxs, rst)
} }
func createCrossMainTx(to string) (*types.Transaction, error) { func createCrossMainTx(to string) (*types.Transaction, error) {
param := types.CreateTx{ param := types.CreateTx{
To: string(to), To: string(to),
......
...@@ -567,4 +567,4 @@ func createParaNormalTx(s suite.Suite, privFrom string, to []byte) (*types.Trans ...@@ -567,4 +567,4 @@ func createParaNormalTx(s suite.Suite, privFrom string, to []byte) (*types.Trans
} }
return tx, nil return tx, nil
} }
\ No newline at end of file
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