Skip to content

Commit

Permalink
adds upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Oct 26, 2023
1 parent aee4590 commit ed48eb5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parachain/pallets/outbound-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub mod pallet {
pub(crate) fn commit_messages() {
let count = MessageLeaves::<T>::decode_len().unwrap_or_default() as u64;
if count == 0 {
return
return;
}

// Create merkle root of messages
Expand All @@ -264,8 +264,8 @@ pub mod pallet {
// Yield if the maximum number of messages has been processed this block.
// This ensures that the weight of `on_finalize` has a known maximum bound.
ensure!(
MessageLeaves::<T>::decode_len().unwrap_or(0) <
T::MaxMessagesPerBlock::get() as usize,
MessageLeaves::<T>::decode_len().unwrap_or(0)
< T::MaxMessagesPerBlock::get() as usize,
ProcessMessageError::Yield
);

Expand Down Expand Up @@ -403,7 +403,7 @@ pub mod pallet {
) -> Result<bool, ProcessMessageError> {
let weight = T::WeightInfo::do_process_message();
if meter.try_consume(weight).is_err() {
return Err(ProcessMessageError::Overweight(weight))
return Err(ProcessMessageError::Overweight(weight));
}
Self::do_process_message(origin, message)
}
Expand Down

0 comments on commit ed48eb5

Please sign in to comment.