-
Notifications
You must be signed in to change notification settings - Fork 91
Add pools to centrifuge runtime #1233
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 all commits
a3095a7
d459aca
8a24359
4247dbd
a4cbc68
a1495f6
04ffb9c
75d6db7
5bb2fc6
e19a8b7
1c63eb7
eecb743
1a9554f
6aea06e
1740bdf
efe18cd
eb7232c
e7282e1
888eadf
ba53154
7f6eb4a
0011592
d5ba981
e4d94e3
8c89a16
4b709a8
6f94c50
c8382d2
fca17d1
1e97c28
ff17c8d
d38790e
474d917
40245fd
cf1b465
71160aa
ece6a56
f2c6a44
654b5ab
274bb56
e2b4b3a
81bee18
8c01c9f
c6f313c
319b4a9
351abec
093c9c4
5b54934
a10d79d
a862e54
94a38f4
5663eb6
ff1f281
c02892f
d761ad4
02d3334
b75e69c
2b66f18
4915a47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -188,7 +188,7 @@ pub enum Release { | |
|
|
||
| impl Default for Release { | ||
| fn default() -> Self { | ||
| Self::V0 | ||
| Self::V2 | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,6 +115,23 @@ pub mod v2 { | |
| } | ||
| } | ||
|
|
||
| pub mod centrifuge { | ||
| use super::*; | ||
|
|
||
| pub struct SetStorageVersionToV2<T>(sp_std::marker::PhantomData<T>); | ||
|
|
||
| impl<T: Config> OnRuntimeUpgrade for SetStorageVersionToV2<T> { | ||
|
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. In theory we could change
Collaborator
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. Removed and defaulted to V2. |
||
| fn on_runtime_upgrade() -> Weight { | ||
| if StorageVersion::<T>::get() != Release::V2 { | ||
| StorageVersion::<T>::set(Release::V2); | ||
| T::DbWeight::get().reads_writes(1, 1) | ||
| } else { | ||
| T::DbWeight::get().reads(1) | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod test { | ||
| use super::*; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.