diff --git a/crates/fuel-core/src/combined_database.rs b/crates/fuel-core/src/combined_database.rs index b798c7c2d52..08a7ddbd239 100644 --- a/crates/fuel-core/src/combined_database.rs +++ b/crates/fuel-core/src/combined_database.rs @@ -316,12 +316,11 @@ impl CombinedDatabase { where S: ShutdownListener, { - let on_chain_height = self - .on_chain() - .latest_height_from_metadata()? - .ok_or(anyhow::anyhow!("on-chain database doesn't have height"))?; + if let Some(on_chain_height) = self.on_chain().latest_height_from_metadata()? { + self.rollback_to(on_chain_height, shutdown_listener)?; + }; - self.rollback_to(on_chain_height, shutdown_listener) + Ok(()) } }