Skip to content

Commit

Permalink
chore: use ZeroInt func
Browse files Browse the repository at this point in the history
  • Loading branch information
jtieri committed Aug 1, 2023
1 parent a9a2903 commit 9b2f6c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions conformance/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ func testPacketRelaySuccess(
t.Logf("Asserting %s to %s transfer", srcChainCfg.ChainID, dstChainCfg.ChainID)
// Assuming these values since the ibc transfers were sent in PreRelayerStart, so balances may have already changed by now
srcInitialBalance := math.NewInt(userFaucetFund)
dstInitialBalance := math.NewInt(0)
dstInitialBalance := math.ZeroInt()

srcAck, err := testutil.PollForAck(ctx, srcChain, srcTx.Height, srcTx.Height+pollHeightMax, srcTx.Packet)
req.NoError(err, "failed to get acknowledgement on source chain")
Expand Down Expand Up @@ -438,7 +438,7 @@ func testPacketRelaySuccess(
dstUser := testCase.Users[1]
dstDenom := dstChainCfg.Denom
// Assuming these values since the ibc transfers were sent in PreRelayerStart, so balances may have already changed by now
srcInitialBalance := math.NewInt(0)
srcInitialBalance := math.ZeroInt()
dstInitialBalance := math.NewInt(userFaucetFund)

dstAck, err := testutil.PollForAck(ctx, dstChain, dstTx.Height, dstTx.Height+pollHeightMax, dstTx.Packet)
Expand Down Expand Up @@ -488,7 +488,7 @@ func testPacketRelayFail(
for i, srcTx := range testCase.TxCache.Src {
// Assuming these values since the ibc transfers were sent in PreRelayerStart, so balances may have already changed by now
srcInitialBalance := math.NewInt(userFaucetFund)
dstInitialBalance := math.NewInt(0)
dstInitialBalance := math.ZeroInt()

timeout, err := testutil.PollForTimeout(ctx, srcChain, srcTx.Height, srcTx.Height+pollHeightMax, srcTx.Packet)
req.NoError(err, "failed to get timeout packet on source chain")
Expand Down Expand Up @@ -518,7 +518,7 @@ func testPacketRelayFail(
// [BEGIN] assert on destination to source transfer
for i, dstTx := range testCase.TxCache.Dst {
// Assuming these values since the ibc transfers were sent in PreRelayerStart, so balances may have already changed by now
srcInitialBalance := math.NewInt(0)
srcInitialBalance := math.ZeroInt()
dstInitialBalance := math.NewInt(userFaucetFund)

timeout, err := testutil.PollForTimeout(ctx, dstChain, dstTx.Height, dstTx.Height+pollHeightMax, dstTx.Packet)
Expand Down
2 changes: 1 addition & 1 deletion examples/ibc/packet_forward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func TestPacketForwardMiddleware(t *testing.T) {
secondHopEscrowAccount := transfertypes.GetEscrowAddress(bcChan.PortID, bcChan.ChannelID).String()
thirdHopEscrowAccount := transfertypes.GetEscrowAddress(cdChan.PortID, abChan.ChannelID).String()

zeroBal := math.NewInt(0)
zeroBal := math.ZeroInt()
transferAmount := math.NewInt(100_000)

t.Run("multi-hop a->b->c->d", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/strangelove-ventures/interchaintest/v7
go 1.19

require (
cosmossdk.io/math v1.0.1
github.com/99designs/keyring v1.2.2
github.com/BurntSushi/toml v1.3.2
github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000
Expand Down Expand Up @@ -55,7 +56,6 @@ require (
cosmossdk.io/depinject v1.0.0-alpha.3 // indirect
cosmossdk.io/errors v1.0.0 // indirect
cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect
cosmossdk.io/math v1.0.1 // indirect
cosmossdk.io/tools/rosetta v0.2.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
Expand Down

0 comments on commit 9b2f6c1

Please sign in to comment.