Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Apr 8, 2024
1 parent 90538ee commit b19778b
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package keeper_test

import (
"errors"
"testing"

"github.com/stretchr/testify/mock"
"github.com/zeta-chain/zetacore/pkg/chains"
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/stretchr/testify/require"
"github.com/zeta-chain/zetacore/pkg/coin"
"github.com/zeta-chain/zetacore/pkg/proofs"
Expand All @@ -19,33 +18,6 @@ import (
observertypes "github.com/zeta-chain/zetacore/x/observer/types"
)

func setupVerificationParams(zk keepertest.ZetaKeepers, ctx sdk.Context, tx_index int64, chainID int64, header ethtypes.Header, headerRLP []byte, block *ethtypes.Block) {
params := zk.ObserverKeeper.GetParamsIfExists(ctx)
zk.ObserverKeeper.SetParams(ctx, params)
zk.ObserverKeeper.SetBlockHeader(ctx, proofs.BlockHeader{
Height: block.Number().Int64(),
Hash: block.Hash().Bytes(),
ParentHash: header.ParentHash.Bytes(),
ChainId: chainID,
Header: proofs.NewEthereumHeader(headerRLP),
})
zk.ObserverKeeper.SetChainParamsList(ctx, observertypes.ChainParamsList{ChainParams: []*observertypes.ChainParams{
{
ChainId: chainID,
ConnectorContractAddress: block.Transactions()[tx_index].To().Hex(),
BallotThreshold: sdk.OneDec(),
MinObserverDelegation: sdk.OneDec(),
IsSupported: true,
},
}})
zk.ObserverKeeper.SetCrosschainFlags(ctx, observertypes.CrosschainFlags{
BlockHeaderVerificationFlags: &observertypes.BlockHeaderVerificationFlags{
IsEthTypeChainEnabled: true,
IsBtcTypeChainEnabled: false,
},
})
}

func TestMsgServer_AddToInTxTracker(t *testing.T) {
t.Run("fail normal user submit without proof", func(t *testing.T) {
k, ctx, _, zk := keepertest.CrosschainKeeper(t)
Expand Down

0 comments on commit b19778b

Please sign in to comment.