Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update mock.rs
  • Loading branch information
shawntabrizi committed May 9, 2020
commit 6f236ed3731c8baba95539d31d1053c7fb170c7a
11 changes: 9 additions & 2 deletions frame/offences/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
#![cfg(test)]

use super::*;
use frame_support::parameter_types;
use frame_support::{
parameter_types,
weights::{Weight, constants::WEIGHT_PER_SECOND},
};
use frame_system as system;
use sp_runtime::{
SaturatedConversion,
Expand All @@ -33,6 +36,10 @@ type AccountIndex = u32;
type BlockNumber = u64;
type Balance = u64;

parameter_types! {
pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
}

impl frame_system::Trait for Test {
type Origin = Origin;
type Index = AccountIndex;
Expand All @@ -45,7 +52,7 @@ impl frame_system::Trait for Test {
type Header = sp_runtime::testing::Header;
type Event = Event;
type BlockHashCount = ();
type MaximumBlockWeight = ();
type MaximumBlockWeight = MaximumBlockWeight;
type DbWeight = ();
type AvailableBlockRatio = ();
type MaximumBlockLength = ();
Expand Down