Fix sized messages (Follow-up on #2064) (#2103)

* Use wasm execution on millau and rialto

It's safer like this since here are some errors that aren't caught when
using native execution

* Revert "Revert "Fix max-size messages at test chains (#2064)" (#2077)"

This reverts commit 62f749e124fbcf074cdc9840690bb9049d4b3b99.

* Adjustments
This commit is contained in:
Serban Iorga
2023-05-03 10:44:06 +03:00
committed by Bastian Köcher
parent 49d11e9ce5
commit de918f8f3c
6 changed files with 161 additions and 32 deletions
+14
View File
@@ -159,7 +159,21 @@ pub enum CustomNetworkId {
RialtoParachain,
}
impl TryFrom<bp_runtime::ChainId> for CustomNetworkId {
type Error = ();
fn try_from(chain: bp_runtime::ChainId) -> Result<Self, Self::Error> {
Ok(match chain {
bp_runtime::MILLAU_CHAIN_ID => Self::Millau,
bp_runtime::RIALTO_CHAIN_ID => Self::Rialto,
bp_runtime::RIALTO_PARACHAIN_CHAIN_ID => Self::RialtoParachain,
_ => return Err(()),
})
}
}
impl CustomNetworkId {
/// Converts self to XCM' network id.
pub const fn as_network_id(&self) -> NetworkId {
match *self {
CustomNetworkId::Millau => NetworkId::Kusama,