/// Download persistent master block & state, enumerate shards and download block & state for each
Download persistent master block & state, enumerate shards and download block & state for each
Download persistent master block & state enumerate shards and download block & state for each
async fn download_start_blocks_and_states(engine: &dyn EngineOperations, handle: &BlockHandle) -> Result<()> {
    let init_mc_block = download_block_and_state(engine, handle.id(), handle.id()).await?;
    CHECK!(handle.state_inited());
    CHECK!(handle.applied());
    for (_shard_ident, block_id) in init_mc_block.shards_blocks()? {
        let shard_handle = engine.load_block_handle(&block_id)?;
        if shard_handle.id().seq_no() == 0 {
            download_zero_state(engine, &shard_handle).await?;
        } else {
            download_block_and_state(engine, &block_id, handle.id()).await?;
        }
        CHECK!(shard_handle.state_inited());
        CHECK!(shard_handle.applied());
    }
    Ok(())
}
async fn download_start_blocks_and_states ( engine : & dyn EngineOperations , handle : & BlockHandle ) -> Result < ( ) > { let init_mc_block = download_block_and_state ( engine , handle . id ( ) , handle . id ( ) ) . await ? ; CHECK ! ( handle state_inited ( ) ) ; CHECK ! ( handle applied ( ) ) ; for ( _shard_ident , block_id ) in init_mc_block . shards_blocks ( ) ? { let shard_handle = engine . load_block_handle ( & block_id ) ? ; if shard_handle . id ( ) . seq_no ( ) == 0 { download_zero_state ( engine , & shard_handle ) . await ? ; } else { download_block_and_state ( engine , & block_id , handle . id ( ) ) . await ? ; } CHECK ! ( shard_handle state_inited ( ) ) ; CHECK ! ( shard_handle applied ( ) ) ; } Ok ( ( ) ) }
Download persistent master block & state, enumerate shards and download block & state for each
Download persistent master block & state enumerate shards and download block & state for each
engine
&dyn EngineOperations
handle
&BlockHandle