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

go/upgrade: Add empty upgrade handler #4616

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

kostko
Copy link
Member

@kostko kostko commented Mar 30, 2022

No description provided.

@kostko kostko force-pushed the kostko/feature/upgrade-empty-handler branch from 5ef1317 to 6fe90aa Compare March 30, 2022 07:34

const (
// EmptyHandler is the name of the upgrade handler that doesn't perform any updates.
EmptyHandler = "empty"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a comment that this is useful for upgrades that bump protocol versions, but don't need any other migrations.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@kostko kostko force-pushed the kostko/feature/upgrade-empty-handler branch from 6fe90aa to 447dba0 Compare March 30, 2022 07:36
@ptrus
Copy link
Member

ptrus commented Mar 30, 2022

Could also add a simple E2E test for the upgrade handler:

// NodeUpgradeDummy is the node upgrade dummy scenario.
NodeUpgradeDummy scenario.Scenario = newNodeUpgradeImpl(migrations.DummyUpgradeHandler, &dummyUpgradeChecker{})
// NodeUpgradeMaxAllowances is the node upgrade max allowances scenario.
NodeUpgradeMaxAllowances scenario.Scenario = newNodeUpgradeImpl(migrations.ConsensusMaxAllowances16Handler, &noOpUpgradeChecker{})
// NodeUpgradeConsensus202108 is the node consensus upgrade 202108 scenario.
NodeUpgradeConsensus202108 scenario.Scenario = newNodeUpgradeImpl(migrations.ConsensusParamsUpdate202108, &upgrade202108Checker{})

@kostko kostko force-pushed the kostko/feature/upgrade-empty-handler branch from 447dba0 to fecead0 Compare March 30, 2022 07:55
@kostko kostko enabled auto-merge March 30, 2022 07:55
@kostko kostko merged commit c2b638c into master Mar 30, 2022
@kostko kostko deleted the kostko/feature/upgrade-empty-handler branch March 30, 2022 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants