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 Mar 19, 2024
1 parent 1fd4d87 commit 746a73a
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.0] - 2023-11-01

### Added
Expand Down Expand Up @@ -126,6 +130,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#115]: https://github.com/dusk-network/kadcast/issues/115
[#117]: https://github.com/dusk-network/kadcast/issues/117
[#123]: https://github.com/dusk-network/kadcast/issues/123
[#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 @@ -112,7 +112,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 @@ -131,7 +131,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 746a73a

Please sign in to comment.