perf: improve genesis handling (#10878)

This commit is contained in:
DaniPopes
2024-09-13 19:48:44 +02:00
committed by GitHub
parent 75c6295d29
commit b23bb7e8bc
24 changed files with 121 additions and 120 deletions

View File

@ -522,13 +522,13 @@ where
/// Convenience function to [`Self::init_genesis`]
pub fn with_genesis(self) -> Result<Self, InitDatabaseError> {
init_genesis(self.provider_factory().clone())?;
init_genesis(self.provider_factory())?;
Ok(self)
}
/// Write the genesis block and state if it has not already been written
pub fn init_genesis(&self) -> Result<B256, InitDatabaseError> {
init_genesis(self.provider_factory().clone())
init_genesis(self.provider_factory())
}
/// Creates a new `WithMeteredProvider` container and attaches it to the