proc filter tx
@@ -8,7 +8,6 @@ import (
"github.com/stretchr/testify/assert"
//"github.com/stretchr/testify/mock"
"encoding/hex"
- "errors"
"math/rand"
"testing"
"time"
@@ -116,20 +115,6 @@ func createTxsGroup(txs []*types.Transaction) ([]*types.Transaction, error) {
return group.Txs, nil
}
-func TestGetBlockHashForkHeightOnMainChain(t *testing.T) {
- para := new(client)
- grpcClient := &typesmocks.Chain33Client{}
- grpcClient.On("GetFork", mock.Anything, &types.ReqKey{Key: []byte("ForkBlockHash")}).Return(&types.Int64{Data: 1}, errors.New("err")).Once()
- para.grpcClient = grpcClient
- _, err := para.GetForkHeightOnMainChain("ForkBlockHash")
- assert.NotNil(t, err)
- grpcClient.On("GetFork", mock.Anything, &types.ReqKey{Key: []byte("ForkBlockHash")}).Return(&types.Int64{Data: 1}, nil).Once()
- ret, err := para.GetForkHeightOnMainChain("ForkBlockHash")
- assert.Nil(t, err)
- assert.Equal(t, int64(1), ret)
-
-}
-
func createTestTxs(t *testing.T) (*types.BlockDetail, []*types.Transaction, []*types.Transaction) {
//all para tx group
tx5, err := createCrossParaTx("toB", 5)
