mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 20:41:02 +00:00
Make the OnRuntimeUpgrade docs more clear (#6542)
This commit is contained in:
@@ -1431,11 +1431,19 @@ impl<BlockNumber: Clone> OnInitialize<BlockNumber> for Tuple {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The runtime upgrade trait. Implementing this lets you express what should happen
|
/// The runtime upgrade trait.
|
||||||
/// when the runtime upgrades, and changes may need to occur to your module.
|
///
|
||||||
|
/// Implementing this lets you express what should happen when the runtime upgrades,
|
||||||
|
/// and changes may need to occur to your module.
|
||||||
pub trait OnRuntimeUpgrade {
|
pub trait OnRuntimeUpgrade {
|
||||||
/// Perform a module upgrade.
|
/// Perform a module upgrade.
|
||||||
///
|
///
|
||||||
|
/// # Warning
|
||||||
|
///
|
||||||
|
/// This function will be called before we initialized any runtime state, aka `on_initialize`
|
||||||
|
/// wasn't called yet. So, information like the block number and any other
|
||||||
|
/// block local data are not accessible.
|
||||||
|
///
|
||||||
/// Return the non-negotiable weight consumed for runtime upgrade.
|
/// Return the non-negotiable weight consumed for runtime upgrade.
|
||||||
fn on_runtime_upgrade() -> crate::weights::Weight { 0 }
|
fn on_runtime_upgrade() -> crate::weights::Weight { 0 }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user