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

Class Block

code/chapter09/blockchain/blockchain2/core/src/block.rs:18–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16// 区块
17#[derive(Debug)]
18pub struct Block {
19 pub header: BlockHeader,
20 pub tranxs: String,
21 pub hash: String,
22}
23
24impl Block {
25 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