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 10, 2024
1 parent 5680bff commit 4eb6676
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Remove `iter.rev()` from BinaryID verification [#139]

## [0.6.1] - 2024-04-10

### Added
Expand Down Expand Up @@ -141,6 +145,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 4eb6676

Please sign in to comment.