feeless 0.1.11

A Nano (cryptocurrency) node and utilities such as nano addresses, hashing blocks, signing, etc.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::node::controller::Controller;

use anyhow::Context;
use tracing::info;

impl Controller {
    pub async fn ensure_genesis(&mut self) -> anyhow::Result<()> {
        info!("Ensuring genesis");
        let mut block = self.network.genesis_block();

        self.add_elected_block(&mut block)
            .await
            .context("Adding genesis block")?;

        Ok(())
    }
}