diff --git a/Cargo.toml b/Cargo.toml index 360c3e69d..e26cb7411 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["resolver"] - [workspace] members = [ "node", diff --git a/runtime/acala/src/lib.rs b/runtime/acala/src/lib.rs index 8a2bd047c..ec85a7d5f 100644 --- a/runtime/acala/src/lib.rs +++ b/runtime/acala/src/lib.rs @@ -1592,7 +1592,7 @@ impl module_homa::Config for Runtime { type XcmInterface = XcmInterface; type WeightInfo = weights::module_homa::WeightInfo; type NominationsProvider = NomineesElection; - type ProcessRedeemRequestsLimit = ConstU32<2_000>; + type ProcessRedeemRequestsLimit = ConstU32<1_000>; } parameter_types! { @@ -2647,4 +2647,14 @@ mod tests { If the limit is too strong, maybe consider increasing the limit", ); } + + #[test] + fn check_on_initialize_with_bump_era_weight() { + use module_homa::WeightInfo; + let weight = weights::module_homa::WeightInfo::::on_initialize_with_bump_era( + ::ProcessRedeemRequestsLimit::get(), + ); + let block_weight = RuntimeBlockWeights::get().max_block.div(3).mul(2); + assert!(weight.all_lt(block_weight)); + } } diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index 7dab295c9..734d44fcd 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -1617,7 +1617,7 @@ impl module_homa::Config for Runtime { type XcmInterface = XcmInterface; type WeightInfo = weights::module_homa::WeightInfo; type NominationsProvider = NomineesElection; - type ProcessRedeemRequestsLimit = ConstU32<2_000>; + type ProcessRedeemRequestsLimit = ConstU32<1_000>; } parameter_types! { @@ -2648,4 +2648,14 @@ mod tests { If the limit is too strong, maybe consider increasing the limit", ); } + + #[test] + fn check_on_initialize_with_bump_era_weight() { + use module_homa::WeightInfo; + let weight = weights::module_homa::WeightInfo::::on_initialize_with_bump_era( + ::ProcessRedeemRequestsLimit::get(), + ); + let block_weight = RuntimeBlockWeights::get().max_block.div(3).mul(2); + assert!(weight.all_lt(block_weight)); + } } diff --git a/runtime/mandala/src/lib.rs b/runtime/mandala/src/lib.rs index 058acb33a..c8cfebb12 100644 --- a/runtime/mandala/src/lib.rs +++ b/runtime/mandala/src/lib.rs @@ -1452,7 +1452,7 @@ impl module_homa::Config for Runtime { type XcmInterface = XcmInterface; type WeightInfo = weights::module_homa::WeightInfo; type NominationsProvider = NomineesElection; - type ProcessRedeemRequestsLimit = ConstU32<2_000>; + type ProcessRedeemRequestsLimit = ConstU32<1_000>; } parameter_types! { @@ -2802,4 +2802,14 @@ mod tests { ); }); } + + #[test] + fn check_on_initialize_with_bump_era_weight() { + use module_homa::WeightInfo; + let weight = weights::module_homa::WeightInfo::::on_initialize_with_bump_era( + ::ProcessRedeemRequestsLimit::get(), + ); + let block_weight = RuntimeBlockWeights::get().max_block.div(3).mul(2); + assert!(weight.all_lt(block_weight)); + } }