pub(crate) fn open_db(
    db_path: PathBuf,
    expected_genesis_hash: H256,
    expected_genesis_block: OpaqueBlock
) -> Result<Db>
Expand description

Open a database at the given location intended for the given genesis block.

If the database is already populated, make sure it is based on the expected genesis If an empty database is opened, it is initialized with the expected genesis hash and genesis block