WIP: Update Substrate & Polkadot (#496)

* WIP: Update Substrate

* Update Substrate & Polkadot

* fixes

* more fixes

* few missing origins

* use spawn_essential_handle

* bump polkadot dep

* remove newlines

* fix test

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Sergei Shulepov
2021-06-17 08:37:03 +01:00
committed by GitHub
parent f45c55be3b
commit 1f3458a0e3
20 changed files with 494 additions and 477 deletions
+3 -3
View File
@@ -373,7 +373,7 @@ pub mod pallet {
}
#[pallet::weight((1_000, DispatchClass::Operational))]
fn sudo_send_upward_message(
pub fn sudo_send_upward_message(
origin: OriginFor<T>,
message: UpwardMessage,
) -> DispatchResult {
@@ -383,7 +383,7 @@ pub mod pallet {
}
#[pallet::weight((1_000_000, DispatchClass::Operational))]
fn authorize_upgrade(origin: OriginFor<T>, code_hash: T::Hash) -> DispatchResult {
pub fn authorize_upgrade(origin: OriginFor<T>, code_hash: T::Hash) -> DispatchResult {
ensure_root(origin)?;
AuthorizedUpgrade::<T>::put(&code_hash);
@@ -393,7 +393,7 @@ pub mod pallet {
}
#[pallet::weight(1_000_000)]
fn enact_authorized_upgrade(_: OriginFor<T>, code: Vec<u8>) -> DispatchResultWithPostInfo {
pub fn enact_authorized_upgrade(_: OriginFor<T>, code: Vec<u8>) -> DispatchResultWithPostInfo {
Self::validate_authorized_upgrade(&code[..])?;
Self::set_code_impl(code)?;
AuthorizedUpgrade::<T>::kill();