-
Notifications
You must be signed in to change notification settings - Fork 92
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: improve feeburner test cov #ntrn-328 #130
chore: improve feeburner test cov #ntrn-328 #130
Conversation
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.
Target branch must be neutron_audit_informal_17_01_2023
80405b4
to
5e3093e
Compare
@@ -116,15 +116,15 @@ func (m *MockContractManagerKeeper) EXPECT() *MockContractManagerKeeperMockRecor | |||
} | |||
|
|||
// AddContractFailure mocks base method. | |||
func (m *MockContractManagerKeeper) AddContractFailure(ctx types.Context, channelId, address string, ackID uint64, ackType string) { | |||
func (m *MockContractManagerKeeper) AddContractFailure(ctx types.Context, channelID, address string, ackID uint64, ackType string) { |
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.
that's just gomock output
x/feeburner/keeper/keeper.go
Outdated
fundsForTreasury, | ||
) | ||
if err != nil { | ||
return fmt.Errorf("error sending funds to treasury for address=%s, tokens=%+v: %v", params.TreasuryAddress, fundsForTreasury, err) |
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.
What is the specific reason of returning an error here? We panic everywhere in this method except this particular line.
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.
That's a bit out of scope). But:
I thought the reason was that it's okay to skip sending to treasury in this block, because we'll do again in later blocks anyway.
But now I think your point is valid actually, and this is not an okay behaviour.
improved coverage of feeburner.
to do that, needed to extract function from EndBlock
also changed to just panic if any error occurs during the process in EndBlock
https://github.com/neutron-org/neutron-tests/actions/runs/4084447916