Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(ethexe): append ping_reorg test #4090

Merged
merged 12 commits into from
Jul 29, 2024
10 changes: 9 additions & 1 deletion ethexe/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ impl Service {
Ok(commitments)
}

pub async fn run(self) -> Result<()> {
async fn run_inner(self) -> Result<()> {
let Service {
db,
network,
Expand Down Expand Up @@ -468,6 +468,7 @@ impl Service {
}
}

log::trace!("Sending timeout after observer event...");
delay = Some(tokio::time::sleep(block_time / 4));
}
_ = maybe_await(delay.take()) => {
Expand Down Expand Up @@ -507,6 +508,13 @@ impl Service {

Ok(())
}

pub async fn run(self) -> Result<()> {
self.run_inner().await.map_err(|err| {
log::error!("Service finished work with error: {:?}", err);
err
})
}
}

pub async fn maybe_await<F: Future>(f: Option<F>) -> F::Output {
Expand Down
Loading
Loading