Skip to content

Commit

Permalink
Fix gas in timeout tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Apr 14, 2022
1 parent 4db4409 commit db3496c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ibc/test_relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ func (ibc IBCTestCase) RelayPacketTestHeightTimeout(testName string, srcChain Ch
return err
}

if srcFinalBalance != srcInitialBalance {
return fmt.Errorf("source balances do not match. expected: %d, actual: %d", srcInitialBalance, srcFinalBalance)
totalFees := srcChain.GetGasFeesInNativeDenom(srcTx.GasWanted)

if srcFinalBalance != srcInitialBalance-totalFees {
return fmt.Errorf("source balances do not match. expected: %d, actual: %d", srcInitialBalance-totalFees, srcFinalBalance)
}

if dstFinalBalance != dstInitialBalance {
Expand Down Expand Up @@ -423,8 +425,10 @@ func (ibc IBCTestCase) RelayPacketTestTimestampTimeout(testName string, srcChain
return err
}

if srcFinalBalance != srcInitialBalance {
return fmt.Errorf("source balances do not match. expected: %d, actual: %d", srcInitialBalance, srcFinalBalance)
totalFees := srcChain.GetGasFeesInNativeDenom(srcTx.GasWanted)

if srcFinalBalance != srcInitialBalance-totalFees {
return fmt.Errorf("source balances do not match. expected: %d, actual: %d", srcInitialBalance-totalFees, srcFinalBalance)
}

if dstFinalBalance != dstInitialBalance {
Expand Down

0 comments on commit db3496c

Please sign in to comment.