Skip to main content

retry_until_ok

Function retry_until_ok 

Source
async fn retry_until_ok<R, Fut>(step: &str, f: impl FnMut() -> Fut) -> R
where Fut: Future<Output = Result<R>>,
Expand description

Run f until it succeeds. An error would end the loop for good, possibly after a seed that waited minutes for peers, so the steps of its start retry, as the leaves it applies do.