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

Add a force_unfreeze extrinsic to the disputes module #3906

Merged
4 commits merged into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
344 changes: 173 additions & 171 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master",
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = [ "derive" ] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = [ "derive" ] }
parity-util-mem = { version = "0.10.0", default-features = false, optional = true }

[features]
Expand Down
2 changes: 1 addition & 1 deletion erasure-coding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"
polkadot-primitives = { path = "../primitives" }
polkadot-node-primitives = { package = "polkadot-node-primitives", path = "../node/primitives" }
novelpoly = { package = "reed-solomon-novelpoly", version = "1.0.0" }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["std", "derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["std", "derive"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master" }
thiserror = "1.0.26"
2 changes: 1 addition & 1 deletion node/collation-generation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ polkadot-primitives = { path = "../../primitives" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" }
thiserror = "1.0.26"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["bit-vec", "derive"] }

[dev-dependencies]
polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" }
2 changes: 1 addition & 1 deletion node/core/approval-voting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
futures = "0.3.17"
futures-timer = "3.0.2"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["bit-vec", "derive"] }
tracing = "0.1.27"
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
lru = "0.6"
Expand Down
2 changes: 1 addition & 1 deletion node/core/av-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ thiserror = "1.0.26"
tracing = "0.1.27"
bitvec = "0.20.1"

parity-scale-codec = { version = "2.0.0", features = ["derive"] }
parity-scale-codec = { version = "2.3.0", features = ["derive"] }
erasure = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
Expand Down
2 changes: 1 addition & 1 deletion node/core/candidate-validation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ futures = "0.3.17"
tracing = "0.1.27"

sp-maybe-compressed-blob = { package = "sp-maybe-compressed-blob", git = "https://github.com/paritytech/substrate", branch = "master" }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["bit-vec", "derive"] }

polkadot-primitives = { path = "../../../primitives" }
polkadot-parachain = { path = "../../../parachain" }
Expand Down
2 changes: 1 addition & 1 deletion node/core/chain-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch =
[dev-dependencies]
futures = { version = "0.3.17", features = ["thread-pool"] }
maplit = "1.0.2"
parity-scale-codec = "2.0.0"
parity-scale-codec = "2.3.0"
polkadot-node-primitives = { path = "../../primitives" }
polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
2 changes: 1 addition & 1 deletion node/core/dispute-participation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ polkadot-primitives = { path = "../../../primitives" }

[dev-dependencies]
assert_matches = "1.5.0"
parity-scale-codec = "2.0.0"
parity-scale-codec = "2.3.0"
polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers"}
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
2 changes: 1 addition & 1 deletion node/core/pvf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ slotmap = "1.0"
tracing = "0.1.27"
pin-project = "1.0.8"
rand = "0.8.3"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
polkadot-parachain = { path = "../../../parachain" }
polkadot-core-primitives = { path = "../../../core-primitives" }
polkadot-node-subsystem-util = { path = "../../subsystem-util"}
Expand Down
2 changes: 1 addition & 1 deletion node/jaeger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ sc-network = { git = "https://github.com/paritytech/substrate", branch = "master
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
thiserror = "1.0.26"
log = "0.4.13"
parity-scale-codec = { version = "2.0.0", default-features = false }
parity-scale-codec = { version = "2.3.0", default-features = false }
2 changes: 1 addition & 1 deletion node/network/availability-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
futures = "0.3.17"
tracing = "0.1.27"
parity-scale-codec = { version = "2.0.0", features = ["std"] }
parity-scale-codec = { version = "2.3.0", features = ["std"] }
polkadot-primitives = { path = "../../../primitives" }
polkadot-erasure-coding = { path = "../../../erasure-coding" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
Expand Down
2 changes: 1 addition & 1 deletion node/network/availability-recovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ polkadot-node-primitives = { path = "../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
polkadot-node-network-protocol = { path = "../../network/protocol" }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion node/network/bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async-trait = "0.1.51"
futures = "0.3.17"
tracing = "0.1.27"
polkadot-primitives = { path = "../../../primitives" }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
Expand Down
2 changes: 1 addition & 1 deletion node/network/collator-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ assert_matches = "1.4.0"
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
parity-scale-codec = { version = "2.0.0", features = ["std"] }
parity-scale-codec = { version = "2.3.0", features = ["std"] }

polkadot-subsystem-testhelpers = { package = "polkadot-node-subsystem-test-helpers", path = "../../subsystem-test-helpers" }
2 changes: 1 addition & 1 deletion node/network/dispute-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"
futures = "0.3.17"
tracing = "0.1.27"
derive_more = "0.99.14"
parity-scale-codec = { version = "2.0.0", features = ["std"] }
parity-scale-codec = { version = "2.3.0", features = ["std"] }
polkadot-primitives = { path = "../../../primitives" }
polkadot-erasure-coding = { path = "../../../erasure-coding" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
Expand Down
2 changes: 1 addition & 1 deletion node/network/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async-trait = "0.1.51"
polkadot-primitives = { path = "../../../primitives" }
polkadot-node-primitives = { path = "../../primitives" }
polkadot-node-jaeger = { path = "../../jaeger" }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" }
strum = { version = "0.21", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion node/network/statement-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ polkadot-node-subsystem-util = { path = "../../subsystem-util" }
polkadot-node-network-protocol = { path = "../../network/protocol" }
arrayvec = "0.5.2"
indexmap = "1.7.0"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
derive_more = "0.99.11"
thiserror = "1.0.26"

Expand Down
2 changes: 1 addition & 1 deletion node/overseer/overseer-gen/proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ proc-macro = true
syn = { version = "1.0.76", features = ["full", "extra-traits"] }
quote = "1.0.9"
proc-macro2 = "1.0.26"
proc-macro-crate = "1.0.0"
proc-macro-crate = "1.1.0"

[dev-dependencies]
assert_matches = "1.5.0"
2 changes: 1 addition & 1 deletion node/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Primitives types for the Node-side"
bounded-vec = "0.4"
futures = "0.3.17"
polkadot-primitives = { path = "../../primitives" }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-consensus-vrf = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion node/subsystem-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Subsystem traits and message definitions"
async-trait = "0.1.51"
futures = "0.3.17"
itertools = "0.10"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
pin-project = "1.0.8"
rand = "0.8.3"
thiserror = "1.0.26"
Expand Down
2 changes: 1 addition & 1 deletion node/test/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Parity Technologies <[email protected]>"]
edition = "2018"

[dependencies]
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }

# Polkadot dependencies
polkadot-test-runtime = { path = "../../../runtime/test-runtime" }
Expand Down
2 changes: 1 addition & 1 deletion parachain/test-parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"

[dependencies]
tiny-keccak = "2.0.2"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }

adder = { package = "test-parachain-adder", path = "adder" }
halt = { package = "test-parachain-halt", path = "halt" }
Expand Down
2 changes: 1 addition & 1 deletion parachain/test-parachains/adder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build = "build.rs"

[dependencies]
parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
tiny-keccak = { version = "2.0.2", features = ["keccak"] }
dlmalloc = { version = "0.2.1", features = [ "global" ] }
Expand Down
2 changes: 1 addition & 1 deletion parachain/test-parachains/adder/collator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name = "adder_collator_puppet_worker"
path = "bin/puppet_worker.rs"

[dependencies]
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
futures = "0.3.17"
futures-timer = "3.0.2"
log = "0.4.13"
Expand Down
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
serde = { version = "1.0.130", optional = true, features = ["derive"] }
scale-info = { version = "1.0", default-features = false, features = ["bit-vec", "derive"] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["bit-vec", "derive"] }
primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
impl-trait-for-tuples = "0.2.0"
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
log = { version = "0.4.13", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/slot_range_helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
paste = "1.0"
enumn = "0.1.3"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }

Expand Down
2 changes: 2 additions & 0 deletions runtime/common/src/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ parameter_types! {
pub const EpochDuration: u64 = 10;
pub const ExpectedBlockTime: Moment = 6_000;
pub const ReportLongevity: u64 = 10;
pub const MaxAuthorities: u32 = 100_000;
}

impl pallet_babe::Config for Test {
Expand All @@ -126,6 +127,7 @@ impl pallet_babe::Config for Test {
)>>::IdentificationTuple;
type HandleEquivocation = ();
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
}

parameter_types! {
Expand Down
2 changes: 1 addition & 1 deletion runtime/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build = "build.rs"

[dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
log = { version = "0.4.14", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
Expand Down
4 changes: 3 additions & 1 deletion runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ impl pallet_babe::Config for Runtime {
pallet_babe::EquivocationHandler<Self::KeyOwnerIdentification, Offences, ReportLongevity>;

type WeightInfo = ();

type MaxAuthorities = MaxAuthorities;
}

parameter_types! {
Expand Down Expand Up @@ -1938,7 +1940,7 @@ sp_api::impl_runtime_apis! {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: BABE_GENESIS_EPOCH_CONFIG.c,
genesis_authorities: Babe::authorities(),
genesis_authorities: Babe::authorities().to_vec(),
randomness: Babe::randomness(),
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] }
log = { version = "0.4.14", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
Expand Down
33 changes: 33 additions & 0 deletions runtime/parachains/src/disputes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use crate::{
};
use bitvec::{bitvec, order::Lsb0 as BitOrderLsb0};
use frame_support::{ensure, traits::Get, weights::Weight};
use frame_system::pallet_prelude::*;
use parity_scale_codec::{Decode, Encode};
use primitives::v1::{
byzantine_threshold, supermajority_threshold, ApprovalVote, CandidateHash, CompactStatement,
Expand All @@ -37,6 +38,11 @@ use sp_runtime::{
};
use sp_std::{collections::btree_set::BTreeSet, prelude::*};

#[cfg(feature = "runtime-benchmarks")]
mod benchmarking;

pub use crate::Origin as ParachainOrigin;

/// Whether the dispute is local or remote.
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)]
pub enum DisputeLocation {
Expand Down Expand Up @@ -212,6 +218,17 @@ impl<T: Config> DisputesHandler<T::BlockNumber> for pallet::Pallet<T> {
}
}

pub trait WeightInfo {
fn force_unfreeze() -> Weight;
}

pub struct TestWeightInfo;
impl WeightInfo for TestWeightInfo {
fn force_unfreeze() -> Weight {
0
}
}

pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
Expand All @@ -223,6 +240,9 @@ pub mod pallet {
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
type RewardValidators: RewardValidators;
type PunishValidators: PunishValidators;

/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;
}

#[pallet::pallet]
Expand Down Expand Up @@ -305,6 +325,19 @@ pub mod pallet {
/// Too many spam slots used by some specific validator.
PotentialSpam,
}

#[pallet::origin]
pub type Origin = ParachainOrigin;

#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::weight(<T as Config>::WeightInfo::force_unfreeze())]
pub fn force_unfreeze(origin: OriginFor<T>) -> DispatchResult {
ensure_root(origin)?;
Frozen::<T>::set(None);
Ok(())
}
}
}

bitflags::bitflags! {
Expand Down
36 changes: 36 additions & 0 deletions runtime/parachains/src/disputes/benchmarking.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright 2021 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use super::*;

use frame_benchmarking::{benchmarks, impl_benchmark_test_suite};
use frame_system::RawOrigin;
use sp_runtime::traits::One;

benchmarks! {
force_unfreeze {
Frozen::<T>::set(Some(One::one()));
}: _(RawOrigin::Root)
verify {
assert!(Frozen::<T>::get().is_none())
}
}

impl_benchmark_test_suite!(
Pallet,
crate::mock::new_test_ext(Default::default()),
crate::mock::Test
);
Loading