Function get_max_consecutive_status_failures

Source
pub fn get_max_consecutive_status_failures(network_type: NetworkType) -> u32
Expand description

Returns the maximum consecutive status check failures allowed for a given network type.

This function maps network types to their specific failure limits, allowing network handlers to apply appropriate circuit breaker thresholds.

§Arguments

  • network_type - The blockchain network type

§Returns

The maximum number of consecutive failures before force-finalization.

§Example

let max_failures = get_max_consecutive_status_failures(NetworkType::Stellar);
assert_eq!(max_failures, STELLAR_MAX_CONSECUTIVE_STATUS_FAILURES);