mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 19:47:59 +00:00
Assign unique storage names to pallets. (#5010)
* Assign unique storage names to pallets. * Bump spec * Upgrade logic for finality tracker (untested) * Logic for migrating Identity (untested) * Logic for migrating transaction-payment * Fix tests * Fix `decl_storage` build * Contract -> Contracts * Update Cargo.lock * bump spec * update migration * Fix merge error * Migration for contracts * Remove serde * Remove some illegal spaces and Options * Fix types in identity. * Minor variable rename Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
@@ -26,6 +26,8 @@ use frame_support::traits::Get;
|
||||
use frame_system::{ensure_none, Trait as SystemTrait};
|
||||
use sp_finality_tracker::{INHERENT_IDENTIFIER, FinalizedInherentData};
|
||||
|
||||
mod migration;
|
||||
|
||||
pub const DEFAULT_WINDOW_SIZE: u32 = 101;
|
||||
pub const DEFAULT_REPORT_LATENCY: u32 = 1000;
|
||||
|
||||
@@ -40,7 +42,7 @@ pub trait Trait: SystemTrait {
|
||||
}
|
||||
|
||||
decl_storage! {
|
||||
trait Store for Module<T: Trait> as Timestamp {
|
||||
trait Store for Module<T: Trait> as FinalityTracker {
|
||||
/// Recent hints.
|
||||
RecentHints get(fn recent_hints) build(|_| vec![T::BlockNumber::zero()]): Vec<T::BlockNumber>;
|
||||
/// Ordered recent hints.
|
||||
@@ -89,6 +91,10 @@ decl_module! {
|
||||
fn on_finalize() {
|
||||
Self::update_hint(<Self as Store>::Update::take())
|
||||
}
|
||||
|
||||
fn on_runtime_upgrade() {
|
||||
migration::on_runtime_upgrade::<T>()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user