Skip to content

Commit

Permalink
fix test app import export
Browse files Browse the repository at this point in the history
  • Loading branch information
JeancarloBarrios committed Dec 17, 2024
1 parent 2a7acef commit 047ef89
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
4 changes: 3 additions & 1 deletion app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ package app
import (
"encoding/json"
"fmt"
"log"

tmproto "github.com/cometbft/cometbft/proto/tendermint/types"

servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/x/staking"
"log"

sdk "github.com/cosmos/cosmos-sdk/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
Expand Down
7 changes: 4 additions & 3 deletions app/simulation/app_determinism_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ package simulation
import (
"encoding/json"
"fmt"
"math/rand"
"os"
"testing"

"github.com/cosmos/cosmos-sdk/server"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"
"github.com/cosmos/ibc-go/v7/testing/simapp"
"math/rand"
"os"
"testing"

dbm "github.com/cometbft/cometbft-db"
"github.com/cometbft/cometbft/libs/log"
Expand Down
3 changes: 0 additions & 3 deletions x/intertx/keeper/msg_submit_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ func (k Keeper) SubmitTx(goCtx context.Context, msg *types.MsgSubmitTx) (*types.
// timeoutTimestamp set to max value with the unsigned bit shifted to satisfy hermes timestamp conversion.
// it is the responsibility of the auth module developer to ensure an appropriate timeout timestamp.
timeoutTimestamp := ctx.BlockTime().Add(time.Minute).UnixNano()
if timeoutTimestamp < 0 {
return nil, sdkerrors.ErrInvalidRequest.Wrap("timeout timestamp is negative")
}
_, err = k.icaControllerKeeper.SendTx(ctx, chanCap, msg.ConnectionId, portID, packetData, uint64(timeoutTimestamp))
if err != nil {
return nil, err
Expand Down
7 changes: 2 additions & 5 deletions x/intertx/keeper/msg_submit_tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ func TestSubmitTx(t *testing.T) {
}
blockTime := time.Unix(35235, 30)
s.sdkCtx.WithBlockTime(blockTime)
timeOut := s.sdkCtx.BlockTime().Add(time.Minute).UnixNano()
// check safe cast to uint64 for timeOut
if timeOut < 0 {
t.Fatalf("timeout timestamp is negative")
}
timeOutBlock := s.sdkCtx.BlockTime().Add(time.Minute)
timeOut := timeOutBlock.UnixNano()

capability := &capabilitytypes.Capability{
Index: 32,
Expand Down

0 comments on commit 047ef89

Please sign in to comment.