MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / BlockChain

Class BlockChain

chain/src/blockchain.rs:26–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24// TODO(ddimaria): store blocks in a patricia merkle trie
25#[derive(Debug)]
26pub(crate) struct BlockChain {
27 pub(crate) accounts: AccountStorage,
28 pub(crate) blocks: Vec<Block>,
29 pub(crate) transactions: Arc<Mutex<TransactionStorage>>,
30 pub(crate) world_state: WorldState,
31}
32
33impl BlockChain {
34 pub(crate) fn new(storage: Arc<Storage>) -> Result<Self> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected