Skip to content

Commit 4fc99df

Browse files
committed
fix: remove duplicate conditions
Additional minor change I noticed when reviewing #5418.
1 parent c6528b8 commit 4fc99df

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

testnet/stacks-node/src/nakamoto_node/relayer.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,9 @@ impl RelayerThread {
303303

304304
/// have we waited for the right conditions under which to start mining a block off of our
305305
/// chain tip?
306-
#[allow(clippy::nonminimal_bool)]
307-
#[allow(clippy::eq_op)]
308306
fn has_waited_for_latest_blocks(&self) -> bool {
309307
// a network download pass took place
310-
(self.min_network_download_passes <= self.last_network_download_passes
311-
// a network inv pass took place
312-
&& self.min_network_download_passes <= self.last_network_download_passes)
308+
self.min_network_download_passes <= self.last_network_download_passes
313309
// we waited long enough for a download pass, but timed out waiting
314310
|| self.last_network_block_height_ts + (self.config.node.wait_time_for_blocks as u128) < get_epoch_time_ms()
315311
// we're not supposed to wait at all

testnet/stacks-node/src/neon_node.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2936,13 +2936,9 @@ impl RelayerThread {
29362936

29372937
/// have we waited for the right conditions under which to start mining a block off of our
29382938
/// chain tip?
2939-
#[allow(clippy::nonminimal_bool)]
2940-
#[allow(clippy::eq_op)]
29412939
pub fn has_waited_for_latest_blocks(&self) -> bool {
29422940
// a network download pass took place
2943-
(self.min_network_download_passes <= self.last_network_download_passes
2944-
// a network inv pass took place
2945-
&& self.min_network_download_passes <= self.last_network_download_passes)
2941+
self.min_network_download_passes <= self.last_network_download_passes
29462942
// we waited long enough for a download pass, but timed out waiting
29472943
|| self.last_network_block_height_ts + (self.config.node.wait_time_for_blocks as u128) < get_epoch_time_ms()
29482944
// we're not supposed to wait at all

0 commit comments

Comments
 (0)