feat: refactor and integrate local engine into EngineNodeLauncher (#11703)

This commit is contained in:
Arsenii Kulikov
2024-10-14 17:21:41 +04:00
committed by GitHub
parent c05a900542
commit 523bfb9c81
16 changed files with 504 additions and 404 deletions

View File

@ -504,7 +504,7 @@ where
} else if let Some(latest_block) = this.state.latest_block {
let now =
SystemTime::now().duration_since(UNIX_EPOCH).unwrap_or_default().as_secs();
if now - this.state.latest_block_time.unwrap_or(0) > 60 {
if now.saturating_sub(this.state.latest_block_time.unwrap_or(0)) > 60 {
// Once we start receiving consensus nodes, don't emit status unless stalled for
// 1 minute
info!(