pub fn create_new_blockchain() -> BlockchainDatabase<MemoryDatabase<HashDigest>> {
    let network = Network::LocalNet;
    let consensus_constants = ConsensusConstantsBuilder::new(network).build();
    let genesis = genesis_template();
    let consensus_manager = ConsensusManagerBuilder::new(network)
        .with_consensus_constants(consensus_constants)
        .with_block(Block {
            header: genesis.header.into(),
            body: genesis.body,
        })
        .on_ties(ChainStrengthComparerBuilder::new().by_height().build())
        .build();
    super::create_mem_db(&consensus_manager)
}
/// Create a new blockchain database containing no blocks.
Create a new blockchain database containing no blocks.
Create a new blockchain database containing no blocks .
pub fn create_new_blockchain() -> BlockchainDatabase<MemoryDatabase<HashDigest>> {
    let network = Network::LocalNet;
    let consensus_constants = ConsensusConstantsBuilder::new(network).build();
    let genesis = genesis_template();
    let consensus_manager = ConsensusManagerBuilder::new(network)
        .with_consensus_constants(consensus_constants)
        .with_block(Block {
            header: genesis.header.into(),
            body: genesis.body,
        })
        .on_ties(ChainStrengthComparerBuilder::new().by_height().build())
        .build();
    super::create_mem_db(&consensus_manager)
}
pub fn create_new_blockchain ( ) -> BlockchainDatabase < MemoryDatabase < HashDigest > > { let network = Network :: LocalNet ; let consensus_constants = ConsensusConstantsBuilder :: new ( network ) . build ( ) ; let genesis = genesis_template ( ) ; let consensus_manager = ConsensusManagerBuilder :: new ( network ) . with_consensus_constants ( consensus_constants ) . with_block ( Block { header : genesis . header . into ( ) , body : genesis . body , } ) . on_ties ( ChainStrengthComparerBuilder :: new ( ) . by_height ( ) . build ( ) ) . build ( ) ; super :: create_mem_db ( & consensus_manager ) }
Create a new blockchain database containing no blocks.
Create a new blockchain database containing no blocks .