Skip to content

Commit

Permalink
fix outgoing message count for rejected input messages (#1435)
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2bd authored Jan 4, 2024
1 parent 7dec31b commit c3ced38
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions linera-chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ where
}
);
// Skip execution of rejected message.
message_counts
.push(u32::try_from(messages.len()).map_err(|_| ArithmeticError::Overflow)?);
continue;
}
let index = u32::try_from(index).map_err(|_| ArithmeticError::Overflow)?;
Expand Down Expand Up @@ -721,6 +723,11 @@ where
WASM_BYTES_WRITTEN_PER_BLOCK
.with_label_values(&[])
.observe(tracker.bytes_written as f64);

assert_eq!(
message_counts.len(),
block.incoming_messages.len() + block.operations.len()
);
Ok(BlockExecutionOutcome {
messages,
message_counts,
Expand Down

0 comments on commit c3ced38

Please sign in to comment.