-
Notifications
You must be signed in to change notification settings - Fork 585
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
refactor: emit cumulative fees when incentivizing a packet multiple times #1391
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1391 +/- ##
==========================================
+ Coverage 80.35% 80.37% +0.01%
==========================================
Files 166 166
Lines 12083 12094 +11
==========================================
+ Hits 9709 9720 +11
Misses 1918 1918
Partials 456 456
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice and clean!
modules/apps/29-fee/keeper/events.go
Outdated
totalRecvFees.Add(fee.Fee.RecvFee...) | ||
totalAckFees.Add(fee.Fee.AckFee...) | ||
totalTimeoutFees.Add(fee.Fee.TimeoutFee...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we reassign as coins.Add(...)
returns sdk.Coins
?
totalRecvFees = totalRecvFees.Add(...)
// ...etc
I think this needs to be done for the singular coin.Add()
function. Not 100% sure about Coins
but may be good practise to keep consistent and handle return value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a good idea to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch 🐛 - the tests were using an expected value of "", the lack of reassigning didn't change the variable values
…bc-go into colin/1327-emit-cumulative-fees
Description
closes: #1327
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.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes