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

Method set_hash

code/chapter09/blockchain/blockchain6/core/src/transaction.rs:34–37  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

32 }
33
34 pub fn set_hash(&mut self) {
35 let txs_ser = serialize(&self);
36 self.hash = hash_str(&txs_ser);
37 }
38}

Callers 1

newMethod · 0.45

Calls 2

serializeFunction · 0.50
hash_strFunction · 0.50

Tested by

no test coverage detected