Skip to content

Commit 0b9188b

Browse files
authored
More tests for message pallet weights (paritytech#1870)
* more tests for message pallet weights * move tests to ensure_weights_are_correct * removed extra tests
1 parent acda8e7 commit 0b9188b

File tree

3 files changed

+235
-89
lines changed

3 files changed

+235
-89
lines changed

modules/messages/src/mock.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use codec::{Decode, Encode};
3434
use frame_support::{
3535
parameter_types,
3636
traits::ConstU64,
37-
weights::{RuntimeDbWeight, Weight},
37+
weights::{constants::RocksDbWeight, Weight},
3838
};
3939
use scale_info::TypeInfo;
4040
use sp_core::H256;
@@ -92,9 +92,10 @@ parameter_types! {
9292
pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024);
9393
pub const MaximumBlockLength: u32 = 2 * 1024;
9494
pub const AvailableBlockRatio: Perbill = Perbill::one();
95-
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { read: 1, write: 2 };
9695
}
9796

97+
pub type DbWeight = RocksDbWeight;
98+
9899
impl frame_system::Config for TestRuntime {
99100
type RuntimeOrigin = RuntimeOrigin;
100101
type Index = u64;

0 commit comments

Comments
 (0)