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

Class BlockChain

code/chapter09/blockchain/blockchain3/core/src/blockchain.rs:12–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected