Skip to main content

bootstrap

Function bootstrap 

Source
pub async fn bootstrap(
    database_filepath: PathBuf,
    connection_pool_size: NonZeroUsize,
    genesis_header: BlockHeader,
    protocol_config: ProtocolConfig,
) -> Result<(), DatabaseError>
Expand description

Creates and initializes the database, then seeds it with the genesis block header as the chain tip.

Returns an error if the database has already been bootstrapped.