Skip to content

Commit

Permalink
fix(collator): externals count
Browse files Browse the repository at this point in the history
  • Loading branch information
Mododo authored and Rexagon committed Jun 10, 2024
1 parent 22f2192 commit 0fe264e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collator/src/mempool/mempool_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ pub async fn handle_anchors(
let mut cache = ExternalMessageCache::new(1000);
while let Some((anchor, points)) = rx.recv().await {
let mut messages = Vec::new();
let mut total_messages = 0;

for point in points.iter() {
total_messages += point.body.payload.len();
'message: for message in &point.body.payload {
let cell = match Boc::decode(message) {
Ok(cell) => cell,
Expand Down Expand Up @@ -198,7 +200,7 @@ pub async fn handle_anchors(
round = anchor.body.location.round.0,
time = anchor.body.time.as_u64(),
externals_unique = messages.len(),
externals_skipped = points.len().saturating_sub(messages.len()),
externals_skipped = total_messages - messages.len(),
"new anchor"
);

Expand Down

0 comments on commit 0fe264e

Please sign in to comment.