-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ensure correct variant count in Runtime[Hold/Freeze]Reason
#1900
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
Changes from 5 commits
706d5ac
88a01c4
7fa85df
3a58cf2
2cd54be
67c624e
50aa9e8
0e483d5
4c5d0a7
ce34c6f
23055ac
0ce8932
ae3fc72
d5d0baf
96e0654
4efd3dc
652733a
26ce0cf
aecd5d0
f0782f5
35c304e
57adfb8
f24b7ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ use frame_support::{ | |
| parameter_types, | ||
| traits::{ | ||
| tokens::fungible, ConstU32, ConstU64, ConstU8, Imbalance as ImbalanceT, OnUnbalanced, | ||
| StorageMapShim, StoredMap, WhitelistedStorageKeys, | ||
| StorageMapShim, StoredMap, VariantCount, WhitelistedStorageKeys, | ||
| }, | ||
| weights::{IdentityFee, Weight}, | ||
| }; | ||
|
|
@@ -70,6 +70,12 @@ pub enum TestId { | |
| Baz, | ||
| } | ||
|
|
||
| impl VariantCount for TestId { | ||
| fn variant_count() -> u32 { | ||
| 3 | ||
| } | ||
| } | ||
|
|
||
| frame_support::construct_runtime!( | ||
| pub struct Test | ||
| { | ||
|
|
@@ -132,9 +138,10 @@ impl Config for Test { | |
| type ReserveIdentifier = TestId; | ||
| type WeightInfo = (); | ||
| type RuntimeHoldReason = TestId; | ||
| type RuntimeFreezeReason = RuntimeFreezeReason; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably me or oliver did too much copy pasta :D I will double check
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually probably not, it should be the default one. |
||
| type FreezeIdentifier = TestId; | ||
| type MaxFreezes = ConstU32<2>; | ||
| type MaxHolds = ConstU32<2>; | ||
| type MaxHolds = ConstU32<3>; | ||
| } | ||
|
|
||
| #[derive(Clone)] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.