Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add fee test with wrong denom order #3493

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DeVikingMark
Copy link

Add test to verify that transactions with fees in non-standard denomination order are processed correctly.
This ensures that the chain is resilient to different orderings of fee denominations in transactions.

The test creates a transaction with fees ordered as "stake" then "atom" and verifies successful processing.

@DeVikingMark DeVikingMark requested review from a team as code owners January 25, 2025 01:47
@@ -86,7 +91,40 @@ func (s *IntegrationTestSuite) TestSlashing() {
s.testSlashing(chainAPI)
}

// todo add fee test with wrong denom order
func (s *IntegrationTestSuite) TestFeeWithWrongDenomOrder() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can you move this to be a function in e2e_bank_test.go and invoke it from within the TestBank function?

Comment on lines +121 to +125
// The transaction should still be accepted and processed correctly
// despite the fees being in a different order
tx, err := s.chainA.SignAndBroadcastTx(val1.keyInfo, txBuilder)
s.Require().NoError(err)
s.Require().Equal(uint32(0), tx.Code)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to use a require.Eventually block like in

s.Require().Eventually(
to actually validate the send worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants