mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 07:11:03 +00:00
Remove Old Migration Code (#5870)
* remove old migration code * Remove old staking * Remove indices migration * Remove upgrade test in transaction-payment * oops * Revert "Remove old staking" This reverts commit 95262b1ac43c9b5bcf49d2ae80800feabcbbbaa0. * remove migration test in staking * fix warnings
This commit is contained in:
@@ -525,12 +525,6 @@ decl_module! {
|
||||
|
||||
fn deposit_event() = default;
|
||||
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
Self::migrate();
|
||||
|
||||
0
|
||||
}
|
||||
|
||||
/// Propose a sensitive action to be taken.
|
||||
///
|
||||
/// The dispatch origin of this call must be _Signed_ and the sender must
|
||||
@@ -1268,25 +1262,6 @@ decl_module! {
|
||||
}
|
||||
|
||||
impl<T: Trait> Module<T> {
|
||||
fn migrate() {
|
||||
use frame_support::{Twox64Concat, migration::{StorageKeyIterator, remove_storage_prefix}};
|
||||
remove_storage_prefix(b"Democracy", b"VotesOf", &[]);
|
||||
remove_storage_prefix(b"Democracy", b"VotersFor", &[]);
|
||||
remove_storage_prefix(b"Democracy", b"Delegations", &[]);
|
||||
for (who, (end, proposal_hash, threshold, delay))
|
||||
in StorageKeyIterator::<
|
||||
ReferendumIndex,
|
||||
(T::BlockNumber, T::Hash, VoteThreshold, T::BlockNumber),
|
||||
Twox64Concat,
|
||||
>::new(b"Democracy", b"ReferendumInfoOf").drain()
|
||||
{
|
||||
let status = ReferendumStatus {
|
||||
end, proposal_hash, threshold, delay, tally: Tally::default()
|
||||
};
|
||||
ReferendumInfoOf::<T>::insert(who, ReferendumInfo::Ongoing(status))
|
||||
}
|
||||
}
|
||||
|
||||
// exposed immutables.
|
||||
|
||||
/// Get the amount locked in support of `proposal`; `None` if proposal isn't a valid proposal
|
||||
|
||||
Reference in New Issue
Block a user