Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Deprecate SpamSlots
Browse files Browse the repository at this point in the history
  • Loading branch information
tdimitrov committed Dec 16, 2022
1 parent 5f707d5 commit 8c4d967
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/parachains/src/disputes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@ pub mod pallet {
/// fewer than `byzantine_threshold + 1` validators.
///
/// The i'th entry of the vector corresponds to the i'th validator in the session.
#[deprecated(
note = "SpamSlots is no longer used and will be removed. Check https://github.com/paritytech/polkadot/pull/6345 for details"
)]
#[pallet::storage]
pub(super) type SpamSlots<T> = StorageMap<_, Twox64Concat, SessionIndex, Vec<u32>>;

Expand Down
2 changes: 2 additions & 0 deletions runtime/parachains/src/disputes/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

//! Storage migration(s) related to disputes pallet

#[allow(deprecated)]
use crate::disputes::{pallet::SpamSlots, Config, Pallet};
use frame_support::{
pallet_prelude::*,
Expand Down Expand Up @@ -44,6 +45,7 @@ pub fn migrate_to_v1<T: Config>() -> Weight {

// SpamSlots should not contain too many keys so removing everything at once should be safe
loop {
#[allow(deprecated)]
let res = SpamSlots::<T>::clear(0, None);
// `loops` is the number of iterations => used to calculate read weights
// `backend` is the number of keys removed from the backend => used to calculate write weights
Expand Down

0 comments on commit 8c4d967

Please sign in to comment.