diff --git a/polkadot/runtime/parachains/Cargo.toml b/polkadot/runtime/parachains/Cargo.toml index a4b9e52e06..5c0ac5eb72 100644 --- a/polkadot/runtime/parachains/Cargo.toml +++ b/polkadot/runtime/parachains/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } -parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } +parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive", "max-encoded-len"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } diff --git a/polkadot/runtime/parachains/src/origin.rs b/polkadot/runtime/parachains/src/origin.rs index 4eedffe586..282afca6ae 100644 --- a/polkadot/runtime/parachains/src/origin.rs +++ b/polkadot/runtime/parachains/src/origin.rs @@ -54,7 +54,16 @@ pub mod pallet { /// Origin for the parachains. #[pallet::origin] - #[derive(PartialEq, Eq, Clone, Encode, Decode, sp_core::RuntimeDebug, scale_info::TypeInfo)] + #[derive( + PartialEq, + Eq, + Clone, + Encode, + Decode, + sp_core::RuntimeDebug, + scale_info::TypeInfo, + MaxEncodedLen, + )] pub enum Origin { /// It comes from a parachain. Parachain(ParaId), diff --git a/polkadot/runtime/westend/src/xcm_config.rs b/polkadot/runtime/westend/src/xcm_config.rs index cbe0ed31f5..cb1d382980 100644 --- a/polkadot/runtime/westend/src/xcm_config.rs +++ b/polkadot/runtime/westend/src/xcm_config.rs @@ -38,7 +38,8 @@ use xcm_builder::{ parameter_types! { pub const WndLocation: MultiLocation = Here.into(); pub const Ancestry: MultiLocation = Here.into(); - pub WestendNetwork: NetworkId = NetworkId::Named(b"Westend".to_vec()); + pub WestendNetwork: NetworkId = + NetworkId::Named(b"Westend".to_vec().try_into().expect("shorter than length limit; qed")); pub CheckAccount: AccountId = XcmPallet::check_account(); }