Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ set_hash
Method
set_hash
code/chapter09/blockchain/blockchain4/core/src/transaction.rs:35–38 ·
view source on GitHub ↗
(&mut self)
Source
from the content-addressed store, hash-verified
33
}
34
35
pub fn set_hash(&mut self) {
36
let txs_ser = serialize(&self);
37
self.hash = hash_str(&txs_ser);
38
}
39
}
Callers
1
new
Method · 0.45
Calls
2
serialize
Function · 0.50
hash_str
Function · 0.50
Tested by
no test coverage detected