diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-10-21 20:56:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-10-21 21:14:13 +0800 |
| commit | dec78fd8bb4cc8f52c857088b274fd06cea2e730 (patch) | |
| tree | 16b0df543fe76b4858ac630dfbd80e6a84a5d9f8 /src/blocks.rs | |
| parent | 2dfd9da52761e738c9d113dee2503bc8a9a82edc (diff) | |
chore(block): directly use self.digest instead
Diffstat (limited to 'src/blocks.rs')
| -rw-r--r-- | src/blocks.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blocks.rs b/src/blocks.rs index 1097626..a058c3c 100644 --- a/src/blocks.rs +++ b/src/blocks.rs @@ -49,7 +49,7 @@ impl Block { for i in 0.. { // reset every loop let mut hasher = Sha256::new(); - Digest::update(&mut hasher, bincode::encode_to_vec((&self.prev_hash, &self.trans, i), bincode::config::standard()).unwrap()); + self.digest(&mut hasher); let hashed = hasher.finalize(); if Self::pref_zeros(&hashed).is_ok() { return i; |
