diff --git a/bin/millau/runtime/src/rialto_messages.rs b/bin/millau/runtime/src/rialto_messages.rs index 62ad919d96..919fac8689 100644 --- a/bin/millau/runtime/src/rialto_messages.rs +++ b/bin/millau/runtime/src/rialto_messages.rs @@ -162,7 +162,6 @@ mod tests { RialtoGrandpaInstance, WithRialtoMessagesInstance, WithRialtoMessageBridge, - bp_millau::Millau, >(AssertCompleteBridgeConstants { this_chain_constants: AssertChainConstants { block_length: bp_millau::BlockLength::get(), diff --git a/bin/rialto/runtime/src/millau_messages.rs b/bin/rialto/runtime/src/millau_messages.rs index 4774d871b7..ff08c08029 100644 --- a/bin/rialto/runtime/src/millau_messages.rs +++ b/bin/rialto/runtime/src/millau_messages.rs @@ -161,7 +161,6 @@ mod tests { MillauGrandpaInstance, WithMillauMessagesInstance, WithMillauMessageBridge, - bp_rialto::Rialto, >(AssertCompleteBridgeConstants { this_chain_constants: AssertChainConstants { block_length: bp_rialto::BlockLength::get(), diff --git a/bin/runtime-common/src/integrity.rs b/bin/runtime-common/src/integrity.rs index 51fb50df7e..5a2c796ee4 100644 --- a/bin/runtime-common/src/integrity.rs +++ b/bin/runtime-common/src/integrity.rs @@ -141,10 +141,9 @@ pub struct AssertChainConstants { /// /// 1) block weight limits are matching; /// 2) block size limits are matching. -pub fn assert_chain_constants(params: AssertChainConstants) +pub fn assert_chain_constants(params: AssertChainConstants) where R: frame_system::Config, - C: Chain, { // we don't check runtime version here, because in our case we'll be building relay from one // repo and runtime will live in another repo, along with outdated relay version. To avoid @@ -274,7 +273,7 @@ pub struct AssertCompleteBridgeConstants<'a> { /// All bridge-related constants tests for the complete standard messages bridge (i.e. with bridge /// GRANDPA and messages pallets deployed). -pub fn assert_complete_bridge_constants(params: AssertCompleteBridgeConstants) +pub fn assert_complete_bridge_constants(params: AssertCompleteBridgeConstants) where R: frame_system::Config + pallet_bridge_grandpa::Config @@ -282,9 +281,8 @@ where GI: 'static, MI: 'static, B: MessageBridge, - This: Chain, { - assert_chain_constants::(params.this_chain_constants); + assert_chain_constants::(params.this_chain_constants); assert_bridge_grandpa_pallet_constants::(); assert_bridge_messages_pallet_constants::(params.messages_pallet_constants); assert_bridge_pallet_names::(params.pallet_names); diff --git a/modules/beefy/src/utils.rs b/modules/beefy/src/utils.rs index 028e61e96b..fac9a2c92e 100644 --- a/modules/beefy/src/utils.rs +++ b/modules/beefy/src/utils.rs @@ -52,7 +52,7 @@ fn verify_authority_set, I: 'static>( /// /// We're using 'conservative' approach here, where signatures of `2/3+1` validators are /// required.. -pub(crate) fn signatures_required, I: 'static>(validators_len: usize) -> usize { +pub(crate) fn signatures_required(validators_len: usize) -> usize { validators_len - validators_len.saturating_sub(1) / 3 } @@ -67,7 +67,7 @@ fn verify_signatures, I: 'static>( // Ensure that the commitment was signed by enough authorities. let msg = commitment.commitment.encode(); - let mut missing_signatures = signatures_required::(authority_set.len()); + let mut missing_signatures = signatures_required(authority_set.len()); for (idx, (authority, maybe_sig)) in authority_set.validators().iter().zip(commitment.signatures.iter()).enumerate() {