Skip to content

Commit

Permalink
Merge pull request #5699 from jbencin/chore/clippy-set-contains-or-in…
Browse files Browse the repository at this point in the history
…sert

chore: Apply Clippy `set_contains_or_insert`
  • Loading branch information
jbencin authored Jan 22, 2025
2 parents a077937 + c46519e commit 90b22d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions testnet/stacks-node/src/neon_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1239,14 +1239,13 @@ impl BlockMinerThread {
let index_block_hash =
StacksBlockId::new(&tip.consensus_hash, &tip.anchored_block_hash);

if !considered.contains(&index_block_hash) {
if considered.insert(index_block_hash) {
let burn_height = burn_db
.get_consensus_hash_height(&tip.consensus_hash)
.expect("FATAL: could not query burnchain block height")
.expect("FATAL: no burnchain block height for Stacks tip");
let candidate = TipCandidate::new(tip, burn_height);
candidates.push(candidate);
considered.insert(index_block_hash);
}
}
}
Expand Down

0 comments on commit 90b22d0

Please sign in to comment.