Function jormungandr::start_up::prepare_block_0
source · pub async fn prepare_block_0(
settings: &Settings,
storage: &Storage
) -> Result<Block, Error>
Expand description
loading the block 0 is not as trivial as it seems, there are different cases that we may encounter:
- we have the block_0 given as parameter of the settings: easy, we read it;
- we have the block_0 hash only:
- check the storage if we don’t have it already there;
- check the network nodes we know about