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

Class Block

code/chapter09/blockchain/blockchain1/core/src/block.rs:17–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected