-
Notifications
You must be signed in to change notification settings - Fork 648
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
feat: add genesis modification function to e2e #2112
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.
looks great! This will allow a lot more flexibility in our tests. I just left a few questions/suggestions 👍
e2e/testconfig/testconfig.go
Outdated
// set correct minimum deposit using configured denom | ||
govGenesisState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(denom, govv1beta1.DefaultMinDepositTokens)) | ||
|
||
// set voting period to 10s |
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.
looks like comment is not in sync with the code
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.
yea, originally I had it at 10s, but that wasn't sufficient for tests passing
cfg := simappparams.MakeTestEncodingConfig() | ||
govv1beta1.RegisterInterfaces(cfg.InterfaceRegistry) | ||
cdc := codec.NewProtoCodec(cfg.InterfaceRegistry) |
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 do you think about moving this to some separate initialization function, is there a benefit to having a new instance each time?
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.
No benefit. Ideally this function would be exposed on ibctest. Where would you suggest we add this initialization function? Are you suggesting we keep a global variable? I think that'd be fine since it is just for testing
I'd be happy to add a generateCodec()
function, but it would still recreate the instance each time
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.
Yeah I guess there wouldn't be much benefit either way, maybe we could consider it if we find ourselves generating the same codec in multiple places. It's probably fine for now to leave this as is
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.
I'll leave as is. I think it'll be easier to wait for a natural place to initialize the codec than to look for one right now
…/ibc-go into colin/2077-add-e2e-modify-genesis
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.
LGTM 👍
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.
🚀
Description
Configures genesis properly for passing gov proposals. See #2071 for passing tests
closes: #2077
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