pub async fn cold_boot(engine: Arc<dyn EngineOperations>) -> Result<BlockIdExt> {
    // TODO: rewrite hard forks from opts to DB
    // engine.get_hardforks();
    // engine.update_hardforks();
    let (mut handle, zero_state, init_block_proof_link) = run_cold(engine.deref()).await?;
    if !engine.initial_sync_disabled() {
        let key_blocks = get_key_blocks(engine.deref(), handle, zero_state.as_ref(), init_block_proof_link).await?;
        handle = choose_masterchain_state(engine.deref(), key_blocks).await?;
    }
    if handle.id().seq_no() == 0 {
        CHECK!(zero_state.is_some());
        download_base_wc_zerosate(engine.deref(), &zero_state.unwrap()).await?;
    } else {
        download_start_blocks_and_states(engine.deref(), &handle).await?;
    }
    Ok(handle.id().clone())
}
/// Cold load best key block and its state
/// Must be used only zero_state or key_block id
Cold load best key block and its state
Must be used only zero_state or key_block id
Cold load best key block and its state Must be used only zero_state or key_block id
pub async fn cold_boot(engine: Arc<dyn EngineOperations>) -> Result<BlockIdExt> {
    // TODO: rewrite hard forks from opts to DB
    // engine.get_hardforks();
    // engine.update_hardforks();
    let (mut handle, zero_state, init_block_proof_link) = run_cold(engine.deref()).await?;
    if !engine.initial_sync_disabled() {
        let key_blocks = get_key_blocks(engine.deref(), handle, zero_state.as_ref(), init_block_proof_link).await?;
        handle = choose_masterchain_state(engine.deref(), key_blocks).await?;
    }
    if handle.id().seq_no() == 0 {
        CHECK!(zero_state.is_some());
        download_base_wc_zerosate(engine.deref(), &zero_state.unwrap()).await?;
    } else {
        download_start_blocks_and_states(engine.deref(), &handle).await?;
    }
    Ok(handle.id().clone())
}
pub async fn cold_boot ( engine : Arc < dyn EngineOperations > ) -> Result < BlockIdExt > { // TODO: rewrite hard forks from opts to DB // engine.get_hardforks(); // engine.update_hardforks(); let ( mut handle , zero_state , init_block_proof_link ) = run_cold ( engine . deref ( ) ) . await ? ; if ! engine . initial_sync_disabled ( ) { let key_blocks = get_key_blocks ( engine . deref ( ) , handle , zero_state . as_ref ( ) , init_block_proof_link ) . await ? ; handle = choose_masterchain_state ( engine . deref ( ) , key_blocks ) . await ? ; } if handle . id ( ) . seq_no ( ) == 0 { CHECK ! ( zero_state is_some ( ) ) ; download_base_wc_zerosate ( engine . deref ( ) , & zero_state . unwrap ( ) ) . await ? ; } else { download_start_blocks_and_states ( engine . deref ( ) , & handle ) . await ? ; } Ok ( handle . id ( ) . clone ( ) ) }
Cold load best key block and its state
Must be used only zero_state or key_block id
Cold load best key block and its state Must be used only zero_state or key_block id
engine
Arc<dyn EngineOperations>
engine
Arc<dyn EngineOperations>