mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-25 11:59:56 +00:00
allow to write pre and post runtime upgrade in pallet macro (#8194)
This commit is contained in:
1 parent
f0c3656489
commit
5232e8ad5c
48 files changed
+136
-6
No files matched your search
@@ -1334,6 +1334,16 @@ macro_rules! decl_module {
|
||||
|
||||
result.saturating_add(additional_write)
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1356,6 +1366,16 @@ macro_rules! decl_module {
|
||||
<$trait_instance as $system::Config>::DbWeight as $crate::traits::Get<_>
|
||||
>::get().writes(1)
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user