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

chore: adding distribute fee events to ics29 #2975

Merged
merged 7 commits into from
Jan 19, 2023

Conversation

damiannolan
Copy link
Member

Description

closes: #2847

Commit Message / Changelog Entry

chore: adding distribute fee events to ics29

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

Nice and clean LGTM 👍

@damiannolan damiannolan marked this pull request as ready for review January 9, 2023 11:15
Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

Should we extend the existing tests to use the brand new AssertEvents function to check that the events emitted are what we expect?

@damiannolan
Copy link
Member Author

Should we extend the existing tests to use the brand new AssertEvents function to check that the events emitted are what we expect?

Most of the existing tests call into the keeper functions directly. To get at the events we'll need to route a new MsgAcknowledgement with the testing library's chain.SendMsgs(...) method. I can look at adding a test to events_test.go but it might take a good bit of boilerplate to generate a proof etc..

@@ -81,3 +86,80 @@ func (suite *KeeperTestSuite) TestIncentivizePacketEvent() {
}
}
}

func (suite *KeeperTestSuite) TestDistributeFeeEvent() {
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ Thanks, @damiannolan!

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not the prettiest test, but it should do the job. Sadly, we can't really emit whether its a recv, ack or timeout fee within the events.

Copy link
Contributor

@charleenfei charleenfei left a comment

Choose a reason for hiding this comment

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

nice one, lgtm!

@codecov-commenter
Copy link

Codecov Report

Merging #2975 (c838356) into main (ff766e3) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2975      +/-   ##
==========================================
+ Coverage   78.41%   78.45%   +0.04%     
==========================================
  Files         178      178              
  Lines       12327    12343      +16     
==========================================
+ Hits         9666     9684      +18     
+ Misses       2236     2234       -2     
  Partials      425      425              
Impacted Files Coverage Δ
modules/apps/29-fee/keeper/escrow.go 92.81% <100.00%> (+0.19%) ⬆️
modules/apps/29-fee/keeper/events.go 100.00% <100.00%> (ø)
modules/apps/29-fee/keeper/relay.go 94.11% <0.00%> (+5.88%) ⬆️

@crodriguezvega crodriguezvega merged commit 3ecc7dd into main Jan 19, 2023
@crodriguezvega crodriguezvega deleted the damian/2847-distribute-fee-events branch January 19, 2023 21:32
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.

Emit events indicating total fees paid upon a packet relay in ics29
5 participants