mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-10 06:27:57 +00:00
Fix for xcm-emulator - Wrong Parachain processing message (#2800)
* fix * forgot para_id * remove unreachable code
This commit is contained in:
@@ -780,7 +780,9 @@ macro_rules! decl_test_networks {
|
||||
while let Some((to_para_id, messages))
|
||||
= $crate::DOWNWARD_MESSAGES.with(|b| b.borrow_mut().get_mut(stringify!($name)).unwrap().pop_front()) {
|
||||
$(
|
||||
if $crate::PARA_IDS.with(|b| b.borrow_mut().get_mut(stringify!($name)).unwrap().contains(&to_para_id)) {
|
||||
let para_id: u32 = <$parachain>::para_id().into();
|
||||
|
||||
if $crate::PARA_IDS.with(|b| b.borrow_mut().get_mut(stringify!($name)).unwrap().contains(&to_para_id)) && para_id == to_para_id {
|
||||
let mut msg_dedup: Vec<(RelayChainBlockNumber, Vec<u8>)> = Vec::new();
|
||||
for m in &messages {
|
||||
msg_dedup.push((m.0, m.1.clone()));
|
||||
@@ -796,8 +798,6 @@ macro_rules! decl_test_networks {
|
||||
$crate::DMP_DONE.with(|b| b.borrow_mut().get_mut(stringify!($name)).unwrap().push_back((to_para_id, m.0, m.1)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
unreachable!();
|
||||
}
|
||||
)*
|
||||
}
|
||||
@@ -810,7 +810,9 @@ macro_rules! decl_test_networks {
|
||||
= $crate::HORIZONTAL_MESSAGES.with(|b| b.borrow_mut().get_mut(stringify!($name)).unwrap().pop_front()) {
|
||||
let iter = messages.iter().map(|(p, b, m)| (*p, *b, &m[..])).collect::<Vec<_>>().into_iter();
|
||||
$(
|
||||
if $crate::PARA_IDS.with(|b| b.borrow_mut().get_mut(stringify!($name)).unwrap().contains(&to_para_id)) {
|
||||
let para_id: u32 = <$parachain>::para_id().into();
|
||||
|
||||
if $crate::PARA_IDS.with(|b| b.borrow_mut().get_mut(stringify!($name)).unwrap().contains(&to_para_id)) && para_id == to_para_id {
|
||||
<$parachain>::handle_xcmp_messages(iter.clone(), $crate::Weight::max_value());
|
||||
}
|
||||
)*
|
||||
|
||||
Reference in New Issue
Block a user