Skip to content

Commit

Permalink
More tests for message pallet weights (#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 c4c0c7a commit 5219b56
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 5219b56

Please sign in to comment.