Skip to content

Commit a177a8b

Browse files
Merge pull request #415 from propeller-heads/cluster-test/dc/fix-block-delay-metrics
fix(cluster-test): Fix block_delay metric (move it up)
2 parents a19f6f4 + 42dfe85 commit a177a8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tycho-integration-test/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,17 @@ async fn process_update(
297297
.header
298298
.number
299299
.abs_diff(update.update.block_number_or_timestamp);
300+
metrics::record_protocol_update_block_delay(block_delay);
300301
// Consume messages that are older than the current block, to give the stream a chance
301302
// to catch up
302-
if update.update.block_number_or_timestamp < block.header.number {
303+
if block_delay > 0 {
303304
warn!(
304305
"Update block ({}) is behind the current block ({}), skipping to catch up.",
305306
update.update.block_number_or_timestamp, block.header.number
306307
);
307308
metrics::record_protocol_update_skipped();
308309
return Ok(());
309310
}
310-
metrics::record_protocol_update_block_delay(block_delay);
311311

312312
if update.is_first_update {
313313
info!("Skipping simulation on first protocol update...");

0 commit comments

Comments
 (0)