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

Class Block

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

Source from the content-addressed store, hash-verified

14
15#[derive(Serialize, Debug)]
16pub struct Block {
17 pub header: BlockHeader,
18 pub tranxs: String,
19 pub hash: String,
20}
21
22impl Block {
23 pub fn new(txs: String, pre_hash: String, bits: u32) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected