Drop Rialto <> Millau bridges (#2663) (#2694)

* drop Rialto <> Millau bridges

* clippy
This commit is contained in:
Svyatoslav Nikolsky
2023-11-14 11:50:26 +03:00
committed by Bastian Köcher
parent 1c2b6b21da
commit 7a8c87a450
114 changed files with 363 additions and 17323 deletions
+3 -3
View File
@@ -280,7 +280,7 @@ pub type TransactionEraOf<C> = crate::TransactionEra<BlockNumberOf<C>, HashOf<C>
/// - constants that are stringified names of runtime API methods:
/// - `BEST_FINALIZED_<THIS_CHAIN>_HEADER_METHOD`
/// - `<THIS_CHAIN>_ACCEPTED_<CONSENSUS>_FINALITY_PROOFS_METHOD`
/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`).
/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`).
#[macro_export]
macro_rules! decl_bridge_finality_runtime_apis {
($chain: ident $(, $consensus: ident => $justification_type: ty)?) => {
@@ -332,7 +332,7 @@ macro_rules! decl_bridge_finality_runtime_apis {
/// - `From<ThisChain>InboundLaneApi`
/// - constants that are stringified names of runtime API methods:
/// - `FROM_<THIS_CHAIN>_MESSAGE_DETAILS_METHOD`,
/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`).
/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`).
#[macro_export]
macro_rules! decl_bridge_messages_runtime_apis {
($chain: ident) => {
@@ -390,7 +390,7 @@ macro_rules! decl_bridge_messages_runtime_apis {
/// Convenience macro that declares bridge finality runtime apis, bridge messages runtime apis
/// and related constants for a chain.
/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`).
/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`).
#[macro_export]
macro_rules! decl_bridge_runtime_apis {
($chain: ident $(, $consensus: ident)?) => {
-29
View File
@@ -61,15 +61,6 @@ pub use sp_runtime::paste;
/// Use this when something must be shared among all instances.
pub const NO_INSTANCE_ID: ChainId = [0, 0, 0, 0];
/// Rialto chain id.
pub const RIALTO_CHAIN_ID: ChainId = *b"rlto";
/// RialtoParachain chain id.
pub const RIALTO_PARACHAIN_CHAIN_ID: ChainId = *b"rlpa";
/// Millau chain id.
pub const MILLAU_CHAIN_ID: ChainId = *b"mlau";
/// Polkadot chain id.
pub const POLKADOT_CHAIN_ID: ChainId = *b"pdot";
@@ -277,18 +268,6 @@ pub fn storage_map_final_key<H: StorageHasher>(
StorageKey(final_key)
}
/// This is how a storage key of storage parameter (`parameter_types! { storage Param: bool = false;
/// }`) is computed.
///
/// Copied from `frame_support::parameter_types` macro.
pub fn storage_parameter_key(parameter_name: &str) -> StorageKey {
let mut buffer = Vec::with_capacity(1 + parameter_name.len() + 1);
buffer.push(b':');
buffer.extend_from_slice(parameter_name.as_bytes());
buffer.push(b':');
StorageKey(sp_io::hashing::twox_128(&buffer).to_vec())
}
/// This is how a storage key of storage value is computed.
///
/// Copied from `frame_support::storage::storage_prefix`.
@@ -574,14 +553,6 @@ where
mod tests {
use super::*;
#[test]
fn storage_parameter_key_works() {
assert_eq!(
storage_parameter_key("MillauToRialtoConversionRate"),
StorageKey(hex_literal::hex!("58942375551bb0af1682f72786b59d04").to_vec()),
);
}
#[test]
fn storage_value_key_works() {
assert_eq!(