File tree Expand file tree Collapse file tree
rust/main/utils/run-locally/src/invariants Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ pub fn lander_metrics_invariants_met(
348348 ) ?
349349 . iter ( )
350350 . sum :: < u32 > ( ) ;
351- let _dropped_transactions = fetch_metric (
351+ let dropped_transactions = fetch_metric (
352352 relayer_port,
353353 "hyperlane_lander_dropped_transactions" ,
354354 filter_hashmap,
@@ -410,6 +410,15 @@ pub fn lander_metrics_invariants_met(
410410 ) ;
411411 return Ok ( false ) ;
412412 }
413+ // Dropped transactions should not exceed half of messages expected
414+ if dropped_transactions > params. total_messages_expected . div_ceil ( 2 ) {
415+ log ! (
416+ "hyperlane_lander_dropped_transactions {} count, expected less than {}" ,
417+ dropped_transactions,
418+ 0
419+ ) ;
420+ return Ok ( false ) ;
421+ }
413422
414423 // resubmissions are possible because it takes a while for the local
415424 // solana validator to report a tx hash as included once broadcast
You can’t perform that action at this time.
0 commit comments