pub fn new() -> Blockchain<Block> {
		let storage = Arc::new(RwLock::new(
			BlockchainStorage {
				blocks: HashMap::new(),
				hashes: HashMap::new(),
				best_hash: Default::default(),
				best_number: Zero::zero(),
				finalized_hash: Default::default(),
				finalized_number: Zero::zero(),
				genesis_hash: Default::default(),
				header_cht_roots: HashMap::new(),
				changes_trie_cht_roots: HashMap::new(),
				leaves: LeafSet::new(),
				aux: HashMap::new(),
			}));
		Blockchain {
			storage: storage.clone(),
		}
	}
/// Create new in-memory blockchain storage.
Create new in-memory blockchain storage.
Create new in - memory blockchain storage .
pub fn new() -> Blockchain<Block> {
		let storage = Arc::new(RwLock::new(
			BlockchainStorage {
				blocks: HashMap::new(),
				hashes: HashMap::new(),
				best_hash: Default::default(),
				best_number: Zero::zero(),
				finalized_hash: Default::default(),
				finalized_number: Zero::zero(),
				genesis_hash: Default::default(),
				header_cht_roots: HashMap::new(),
				changes_trie_cht_roots: HashMap::new(),
				leaves: LeafSet::new(),
				aux: HashMap::new(),
			}));
		Blockchain {
			storage: storage.clone(),
		}
	}
pub fn new ( ) -> Blockchain < Block > { let storage = Arc :: new ( RwLock :: new ( BlockchainStorage { blocks : HashMap :: new ( ) , hashes : HashMap :: new ( ) , best_hash : Default :: default ( ) , best_number : Zero :: zero ( ) , finalized_hash : Default :: default ( ) , finalized_number : Zero :: zero ( ) , genesis_hash : Default :: default ( ) , header_cht_roots : HashMap :: new ( ) , changes_trie_cht_roots : HashMap :: new ( ) , leaves : LeafSet :: new ( ) , aux : HashMap :: new ( ) , } ) ) ; Blockchain { storage : storage . clone ( ) , } }
Create new in-memory blockchain storage.
Create new in - memory blockchain storage .