Skip to content
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.encode().len();
Comment thread
vstam1 marked this conversation as resolved.
Outdated
if data.len() + format_size > max_message_size {
Comment thread
franciscoaguirre marked this conversation as resolved.
Outdated
Comment thread
franciscoaguirre marked this conversation as resolved.
Outdated
return Err(MessageSendError::TooBig)
}

Expand Down