forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add --unsafe-remove-modules flag to Rollback cmd (#546)
* add --unsafe-remove-modules flag to Rollback cmd * adds public DeleteKVStore method on root multistore * rollback command accepts list of store keys names to forcibly delete this is useful for rolling back an upgrade that adds modules. rollbacks are performed by loading & committing the previous version. without this new functionality, the rollback will fail because no store version will exist for modules added during the upgrade. to properly rollback the state, pass in a list of the added module names and they will be completely removed before the rollback of pre-existing modules takes place: ``` chain rollback --unsafe-remove-modules mynewmodule,othernewmodule ``` * add DeleteVersionsFrom to Tree like DeleteVersionsTo, but deletes the given version & upwards * write deletion of current & future versions * rename DeleteKVStore -> DeleteLatestVersion * remove unnecessary deleteKVStore call the DeleteVersionsFrom on the unwrapped KVStore should be sufficient
- Loading branch information
1 parent
3d565b7
commit dfce46d
Showing
4 changed files
with
88 additions
and
1 deletion.
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
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