Skip to content

Commit

Permalink
Remove iter.rev
Browse files Browse the repository at this point in the history
Resolves #139
  • Loading branch information
herr-seppia committed Apr 9, 2024
1 parent d434062 commit 25687d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Change 'need_bootstrappers' to have dinamically threshold [#135]
- Change `BinaryID::from_nonce` to return result [#136]
- Change maintainer to ping nodes while removal [#138]
- Remove `iter.rev()` from BinaryID verification [#139]

## [0.6.0] - 2023-11-01

Expand Down Expand Up @@ -139,6 +140,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#135]: https://github.com/dusk-network/kadcast/issues/135
[#136]: https://github.com/dusk-network/kadcast/issues/136
[#138]: https://github.com/dusk-network/kadcast/issues/138
[#139]: https://github.com/dusk-network/kadcast/issues/139

<!-- Releases -->

Expand Down
4 changes: 2 additions & 2 deletions src/kbucket/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl BinaryID {
let nonce_bytes = nonce.to_le_bytes();
hasher.update(nonce_bytes);
if BinaryID::verify_difficulty(
&mut hasher.finalize_reset().iter().rev(),
&mut hasher.finalize_reset().iter(),
K_DIFF_PRODUCED_BIT,
) {
return Self {
Expand All @@ -139,7 +139,7 @@ impl BinaryID {
hasher.update(self.bytes);
hasher.update(self.nonce);
BinaryID::verify_difficulty(
&mut hasher.finalize().iter().rev(),
&mut hasher.finalize().iter(),
K_DIFF_MIN_BIT,
)
}
Expand Down

0 comments on commit 25687d0

Please sign in to comment.