Skip to content

Commit

Permalink
More tests for message pallet weights (paritytech#1870)
Browse files Browse the repository at this point in the history
* more tests for message pallet weights

* move tests to ensure_weights_are_correct

* removed extra tests
  • Loading branch information
svyatonik authored Feb 13, 2023
1 parent acda8e7 commit 0b9188b
Show file tree
Hide file tree
Showing 3 changed files with 235 additions and 89 deletions.
5 changes: 3 additions & 2 deletions modules/messages/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use codec::{Decode, Encode};
use frame_support::{
parameter_types,
traits::ConstU64,
weights::{RuntimeDbWeight, Weight},
weights::{constants::RocksDbWeight, Weight},
};
use scale_info::TypeInfo;
use sp_core::H256;
Expand Down Expand Up @@ -92,9 +92,10 @@ parameter_types! {
pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024);
pub const MaximumBlockLength: u32 = 2 * 1024;
pub const AvailableBlockRatio: Perbill = Perbill::one();
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { read: 1, write: 2 };
}

pub type DbWeight = RocksDbWeight;

impl frame_system::Config for TestRuntime {
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
Expand Down
Loading

0 comments on commit 0b9188b

Please sign in to comment.