-
Notifications
You must be signed in to change notification settings - Fork 51
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
Migrate PendingVerification in pallet_registrar from value to map #528
Migrate PendingVerification in pallet_registrar from value to map #528
Conversation
42e3a16
to
7fa3722
Compare
Coverage Report@@ Coverage Diff @@
## master tomasz-registrar-migrate-pending-verification +/- ##
=================================================================================
- Coverage 65.36% 65.25% -0.11%
Files 68 68
+ Lines 10001 10024 +23
=================================================================================
+ Hits 6537 6541 +4
+ Misses 3464 3483 +19
|
@@ -377,6 +378,40 @@ where | |||
} | |||
} | |||
|
|||
pub struct RegistrarPendingVerificationValueToMap<T>(pub PhantomData<T>); |
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.
Can we add a test for the migration?
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.
The PR looks good but I would prefer if the migration was tested. Also we can use the pre and post upgrade hooks for this
The problem is that this storage item can be empty if there are no pending chains, so I don't know what to test for. But I can add an integration test similar to |
…grate-pending-verification
…grate-pending-verification
So I think:
Yes similar to |
Yes, that's already done and it works :) |
This allows an unlimited number of para ids to be waiting for verification, by using an unbounded
StorageMap<ParaId, ()>
instead of a boundedStorageValue<Vec<ParaId>>
.Breaking change, includes a migration.