retry_until_true

Function retry_until_true 

Source
pub async fn retry_until_true<F, Fut>(
    check_name: &str,
    check_fn: F,
) -> Result<bool>
where F: FnMut() -> Fut, Fut: Future<Output = Result<bool>>,
Expand description

retry helper for checking state after transactions Retries up to 5 times with exponential backoff (500ms, 1s, 2s, 4s, 8s) Parameters:

  • check_name: the name of the check
  • check_fn: the function to check, must return Result<bool>

Returns:

  • Ok(true) if the check passed, Ok(false)