-
Notifications
You must be signed in to change notification settings - Fork 124
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
[CORE-517] add integration tests for prices governance messages #808
Conversation
WalkthroughThe changes involve the addition of a new test function Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- protocol/testing/e2e/gov/prices_test.go (1 hunks)
- protocol/testutil/prices/market_param_price.go (1 hunks)
Files skipped from review due to trivial changes (1)
- protocol/testing/e2e/gov/prices_test.go
Additional comments: 1
protocol/testutil/prices/market_param_price.go (1)
- 43-47: The new function
WithMinPriceChangePpm
is implemented correctly and follows the established pattern of the otherMarketParamPriceModifierOption
functions.
MODIFIED_MARKET_PARAM = pricestypes.MarketParam{ | ||
Id: 0, | ||
Pair: "eth-adv4tnt", | ||
Exponent: -8, |
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.
nit: you can use GENESIS_MARKET_PARAM.Exponent
here instead of -8 with a comment that exponents cannot change.
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.
... you could also use GENESIS_MARKET_PARAM.Id
to populate the Id
field.
msg: &pricestypes.MsgUpdateMarketParam{ | ||
Authority: lib.GovModuleAddress.String(), | ||
MarketParam: pricestypes.MarketParam{ | ||
Id: GENESIS_MARKET_PARAM.Id, |
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.
Question: if you are using GENESIS_MARKET_PARAM.Id
instead of MODIFIED_MARKET_PARAM.Id
here (presumably to show the id doesn't change,) does it also make sense to do the same thing with the exponent field? It seems like the treatment of these two fields is inconsistent.
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.
good call. modified to MODIFIED_MARKET_PARAM.Id
to be consistent
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.
Changelist
add integration tests for
MsgUpdateMarketParam
Author/Reviewer Checklist
state-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.