mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 21:07:56 +00:00
fix clippy (#1698)
This commit is contained in:
committed by
Bastian Köcher
parent
3eb24d4515
commit
66dfd2dcae
@@ -199,8 +199,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
||||
Ok(k) => keystore_container.set_remote_keystore(k),
|
||||
Err(e) =>
|
||||
return Err(ServiceError::Other(format!(
|
||||
"Error hooking up remote keystore for {}: {}",
|
||||
url, e
|
||||
"Error hooking up remote keystore for {url}: {e}"
|
||||
))),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -59,10 +59,7 @@ pub fn ensure_able_to_receive_message<W: WeightInfoExt>(
|
||||
max_incoming_message_proof_size.saturating_add(SIGNED_EXTENSIONS_SIZE);
|
||||
assert!(
|
||||
max_delivery_transaction_size <= max_extrinsic_size,
|
||||
"Size of maximal message delivery transaction {} + {} is larger than maximal possible transaction size {}",
|
||||
max_incoming_message_proof_size,
|
||||
SIGNED_EXTENSIONS_SIZE,
|
||||
max_extrinsic_size,
|
||||
"Size of maximal message delivery transaction {max_incoming_message_proof_size} + {SIGNED_EXTENSIONS_SIZE} is larger than maximal possible transaction size {max_extrinsic_size}",
|
||||
);
|
||||
|
||||
// verify that we're able to receive proof of maximal-size message with maximal dispatch weight
|
||||
@@ -75,9 +72,7 @@ pub fn ensure_able_to_receive_message<W: WeightInfoExt>(
|
||||
);
|
||||
assert!(
|
||||
max_delivery_transaction_dispatch_weight.all_lte(max_extrinsic_weight),
|
||||
"Weight of maximal message delivery transaction + {} is larger than maximal possible transaction weight {}",
|
||||
max_delivery_transaction_dispatch_weight,
|
||||
max_extrinsic_weight,
|
||||
"Weight of maximal message delivery transaction + {max_delivery_transaction_dispatch_weight} is larger than maximal possible transaction weight {max_extrinsic_weight}",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -94,10 +89,7 @@ pub fn ensure_able_to_receive_confirmation<W: WeightInfoExt>(
|
||||
max_inbound_lane_data_proof_size_from_peer_chain.saturating_add(SIGNED_EXTENSIONS_SIZE);
|
||||
assert!(
|
||||
max_confirmation_transaction_size <= max_extrinsic_size,
|
||||
"Size of maximal message delivery confirmation transaction {} + {} is larger than maximal possible transaction size {}",
|
||||
max_inbound_lane_data_proof_size_from_peer_chain,
|
||||
SIGNED_EXTENSIONS_SIZE,
|
||||
max_extrinsic_size,
|
||||
"Size of maximal message delivery confirmation transaction {max_inbound_lane_data_proof_size_from_peer_chain} + {SIGNED_EXTENSIONS_SIZE} is larger than maximal possible transaction size {max_extrinsic_size}",
|
||||
);
|
||||
|
||||
// verify that we're able to reward maximal number of relayers that have delivered maximal
|
||||
@@ -112,9 +104,7 @@ pub fn ensure_able_to_receive_confirmation<W: WeightInfoExt>(
|
||||
);
|
||||
assert!(
|
||||
max_confirmation_transaction_dispatch_weight.all_lte(max_extrinsic_weight),
|
||||
"Weight of maximal confirmation transaction {} is larger than maximal possible transaction weight {}",
|
||||
max_confirmation_transaction_dispatch_weight,
|
||||
max_extrinsic_weight,
|
||||
"Weight of maximal confirmation transaction {max_confirmation_transaction_dispatch_weight} is larger than maximal possible transaction weight {max_extrinsic_weight}",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -408,11 +408,7 @@ mod tests {
|
||||
let difference = (expected_size.unwrap() as f64 - actual_size as f64).abs();
|
||||
assert!(
|
||||
difference / (std::cmp::min(actual_size, expected_size.unwrap()) as f64) < 0.1,
|
||||
"Too large difference between actual ({}) and expected ({:?}) inbound lane data size. Test case: {}+{}",
|
||||
actual_size,
|
||||
expected_size,
|
||||
relayer_entries,
|
||||
messages_count,
|
||||
"Too large difference between actual ({actual_size}) and expected ({expected_size:?}) inbound lane data size. Test case: {relayer_entries}+{messages_count}",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ mod tests {
|
||||
|
||||
fn print_xcm<RuntimeCall>(xcm: &VersionedXcm<RuntimeCall>) {
|
||||
println!("-----------------");
|
||||
println!("xcm (plain): {:?}", xcm);
|
||||
println!("xcm (plain): {xcm:?}");
|
||||
println!("xcm (bytes): {:?}", xcm.encode());
|
||||
println!("xcm (hex): {:?}", hexdisplay::HexDisplay::from(&xcm.encode()));
|
||||
}
|
||||
|
||||
@@ -495,8 +495,7 @@ fn validate_out_msgs_details<C: Chain>(
|
||||
) -> Result<(), SubstrateError> {
|
||||
let make_missing_nonce_error = |expected_nonce| {
|
||||
Err(SubstrateError::Custom(format!(
|
||||
"Missing nonce {} in message_details call result. Expected all nonces from {:?}",
|
||||
expected_nonce, nonces,
|
||||
"Missing nonce {expected_nonce} in message_details call result. Expected all nonces from {nonces:?}",
|
||||
)))
|
||||
};
|
||||
|
||||
|
||||
@@ -147,8 +147,7 @@ where
|
||||
let parachain = ParaId(P::SOURCE_PARACHAIN_PARA_ID);
|
||||
if parachains != [parachain] {
|
||||
return Err(SubstrateError::Custom(format!(
|
||||
"Trying to prove unexpected parachains {:?}. Expected {:?}",
|
||||
parachains, parachain,
|
||||
"Trying to prove unexpected parachains {parachains:?}. Expected {parachain:?}",
|
||||
)))
|
||||
}
|
||||
|
||||
@@ -177,8 +176,7 @@ where
|
||||
.transpose()?
|
||||
.ok_or_else(|| {
|
||||
SubstrateError::Custom(format!(
|
||||
"Failed to read expected parachain {:?} head at {:?}",
|
||||
parachain, at_block
|
||||
"Failed to read expected parachain {parachain:?} head at {at_block:?}"
|
||||
))
|
||||
})?;
|
||||
let parachain_head_hash = parachain_head.hash();
|
||||
|
||||
Reference in New Issue
Block a user