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

Method prepare_data

code/chapter09/blockchain/blockchain3/core/src/pow.rs:56–59  ·  view source on GitHub ↗
(block: &mut Block, nonce: u32)

Source from the content-addressed store, hash-verified

54 }
55
56 fn prepare_data(block: &mut Block, nonce: u32) -> Vec<u8> {
57 block.header.nonce = nonce;
58 serialize(&(block.header))
59 }
60}

Callers

nothing calls this directly

Calls 1

serializeFunction · 0.50

Tested by

no test coverage detected