mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-03 13:53:12 +00:00
add Transaction::hash inline docs
This commit is contained in:
parent
b16575b407
commit
81b6d34693
@ -151,6 +151,7 @@ impl ActionData {
|
||||
}
|
||||
|
||||
impl Transaction {
|
||||
/// Computes and returns the SHA-256 hash of the JSON-serialized representation of `self`.
|
||||
pub fn hash(&self) -> TreeHashType {
|
||||
let raw_data = serde_json::to_vec(&self).unwrap();
|
||||
let mut hasher = sha2::Sha256::new();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user