Skip to content

feat: remove dyn filter & relay migration#411

Merged
weichweich merged 5 commits intomasterfrom
aw-1.7.3
Sep 27, 2022
Merged

feat: remove dyn filter & relay migration#411
weichweich merged 5 commits intomasterfrom
aw-1.7.3

Conversation

@weichweich
Copy link
Contributor

@weichweich weichweich commented Sep 14, 2022

Checklist:

  • ‼️ Migrations to clean up storage
  • I have verified that the code works
    • No panics! (checked arithmetic ops, no indexing array[3] use get(3), ...)
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@weichweich weichweich changed the base branch from develop to master September 14, 2022 12:58
@weichweich weichweich marked this pull request as ready for review September 20, 2022 11:47
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

My two cents

Comment on lines +33 to +42
let has_storage = frame_support::storage::migration::have_storage_value(
b"RelayMigration",
b"RelayNumberStrictlyIncreases",
b"",
) && frame_support::storage::migration::have_storage_value(b"DynFilter", b"Filter", b"");
if has_storage {
Ok(())
} else {
Err("Pallets not present")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

W: Use ensure instead separated for both pallets.

Comment on lines +49 to +50
let _ = frame_support::storage::unhashed::clear_prefix(&Twox128::hash(b"RelayMigration"), Some(entries), None);
let _ = frame_support::storage::unhashed::clear_prefix(&Twox128::hash(b"DynFilter"), Some(entries), None);
Copy link
Contributor

Choose a reason for hiding this comment

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

S: Add least post some success and debug message based on the result of the clearing.

@weichweich weichweich merged commit 6dd4041 into master Sep 27, 2022
@weichweich weichweich deleted the aw-1.7.3 branch September 27, 2022 09:01
wischli pushed a commit that referenced this pull request Oct 2, 2022
* feat: remove dyn filter & relay migration

* 🧹🐢

* feat: migration to remove storage

* better logs
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.

2 participants