forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 33
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 "is-genesis" check #267
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
826df0a
is gen test
czarcas7ic e5877ac
my attempt at isGenesis
czarcas7ic 3124de4
logs and uncomment
czarcas7ic 38a394c
more changes
czarcas7ic ce504ef
comment out
czarcas7ic 3629d3f
change init gen call loc
czarcas7ic d78425c
further gen tests
czarcas7ic 752ddd6
more tests
czarcas7ic ddfe731
another test
czarcas7ic 16a11bb
revert unneeded changes
czarcas7ic 692cbfc
remove extra
czarcas7ic f68986b
reset to false
czarcas7ic 6ba4bc3
Update x/auth/ante/sigverify.go
czarcas7ic 7761bfb
changes from call with bez
czarcas7ic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Lets remove this
||
here, and just useIsGenesis
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.
or alternatively do
IsGenesis && ctx.BlockHeight() == ctx.InitialHeight()
as a defense in depth.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.
Too many tests fail that would require funky re-wiring. This is why I suggested to add the
||
to keep the tests passing. Probably becauseIsGenesis
returns false as it does not go through theInitGenesis
flow.Alternatively, the
|| ctx.BlockHeight() == ctx.InitialHeight()
can work too.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 @ValarDragon we switched it to the OR due to tests failing, should we aim to rewrite the tests or does this implementation work?