MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / BlockChain

Class BlockChain

code/chapter09/blockchain/blockchain4/core/src/blockchain.rs:13–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11const PRE_HASH: &str = "22caaf24ef0aea3522c13d133912d2b722caaf24ef0aea3522c13d133912d2b7";
12
13pub struct BlockChain {
14 pub blocks: Vec<Block>,
15 curr_bits: u32,
16 blocks_db: Box<Database<BKey>>,
17}
18
19impl BlockChain {
20 pub fn new() -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected