Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix XCMP max message size check #1250

Merged
merged 14 commits into from
Dec 4, 2023
3 changes: 2 additions & 1 deletion cumulus/pallets/xcmp-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ impl<T: Config> Pallet<T> {

let max_message_size =
T::ChannelInfo::get_channel_max(recipient).ok_or(MessageSendError::NoChannel)?;
if data.len() > max_message_size {
let format_size = format.encoded_size();
if data.len() + format_size > max_message_size {
franciscoaguirre marked this conversation as resolved.
Show resolved Hide resolved
franciscoaguirre marked this conversation as resolved.
Show resolved Hide resolved
return Err(MessageSendError::TooBig)
}

Expand Down
Loading