Skip to content
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

Remove UsingNewGenesisCommand config in favor of a runtime check #759

Merged
merged 7 commits into from
Sep 8, 2023

Conversation

Reecepbcups
Copy link
Member

Closes #742

summary

Removing the config option UsingNewGenesisCommand makes it easier to write test spanning multiple SDK versions (v45 - 50).

@Reecepbcups Reecepbcups added the BACKPORT backport into all maintained branches label Sep 8, 2023
@Reecepbcups Reecepbcups changed the title Remove UsingNewGenesisCommand config to instead check at runtime. Remove UsingNewGenesisCommand config in favor of a runtime check Sep 8, 2023
@Reecepbcups Reecepbcups marked this pull request as ready for review September 8, 2023 07:28
@Reecepbcups Reecepbcups requested a review from a team as a code owner September 8, 2023 07:28
@Reecepbcups Reecepbcups requested a review from jtieri September 8, 2023 07:28
@Reecepbcups Reecepbcups enabled auto-merge (squash) September 8, 2023 07:28
command = []string{"export", "--height", fmt.Sprint(height), "--home", tn.HomeDir()}
)

if isNewGenesis {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can keep the var here so the lookup doesn't need to be performed twice within this method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

examples/cosmos/sdk_boundary_test.go Outdated Show resolved Hide resolved
examples/cosmos/sdk_boundary_test.go Outdated Show resolved Hide resolved
if err != nil {
return false
}

return true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we return false here?

Copy link
Member Author

@Reecepbcups Reecepbcups Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good catch since I moved logic around, resolved 0ff4168

Once #760 gets in I will test all these chain_node functions in a simple test to catch this in the future

@Reecepbcups Reecepbcups merged commit cc12f99 into main Sep 8, 2023
Copy link
Member

@agouin agouin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@Reecepbcups Reecepbcups deleted the reece/remove-new-genesis-requirement branch September 8, 2023 18:14
mergify bot pushed a commit that referenced this pull request Sep 8, 2023
)

* ictest: remove UseNewGenesisCommand

* localic: remove UseNewGenesisCommand

* minor: remove needless variable

* Make `IsAboveSDK47` public

(cherry picked from commit cc12f99)

# Conflicts:
#	examples/cosmos/sdk_boundary_test.go
#	local-interchain/go.mod
#	local-interchain/go.sum
Reecepbcups added a commit that referenced this pull request Sep 11, 2023
)

* ictest: remove UseNewGenesisCommand

* localic: remove UseNewGenesisCommand

* minor: remove needless variable

* Make `IsAboveSDK47` public
Reecepbcups added a commit that referenced this pull request Sep 11, 2023
… a runtime check (#765)

* Remove `UsingNewGenesisCommand` config in favor of a runtime check (#759)

* ictest: remove UseNewGenesisCommand

* localic: remove UseNewGenesisCommand

* minor: remove needless variable

* Make `IsAboveSDK47` public

(cherry picked from commit cc12f99)

# Conflicts:
#	examples/cosmos/sdk_boundary_test.go
#	local-interchain/go.mod
#	local-interchain/go.sum

* Remove `UsingNewGenesisCommand` config in favor of a runtime check (#759)

* ictest: remove UseNewGenesisCommand

* localic: remove UseNewGenesisCommand

* minor: remove needless variable

* Make `IsAboveSDK47` public

---------

Co-authored-by: Reece Williams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BACKPORT backport into all maintained branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor UsingNewGenesisCommand
2 participants