Skip to content

Commit ff66b68

Browse files
obycodejbencin
andauthored
chore: better rustiness
Co-authored-by: Jeff Bencin <[email protected]>
1 parent 674d517 commit ff66b68

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,18 +278,15 @@ impl StackerDBListener {
278278
let (lock, cvar) = &*self.blocks;
279279
let mut blocks = lock.lock().expect("FATAL: failed to lock block status");
280280

281-
let block = match blocks.get_mut(&block_sighash) {
282-
Some(block) => block,
283-
None => {
284-
info!(
285-
"StackerDBListener: Received signature for block that we did not request. Ignoring.";
286-
"signature" => %signature,
287-
"block_signer_sighash" => %block_sighash,
288-
"slot_id" => slot_id,
289-
"signer_set" => self.signer_set,
290-
);
291-
continue;
292-
}
281+
let Some(block) = blocks.get_mut(&block_sighash) else {
282+
info!(
283+
"StackerDBListener: Received signature for block that we did not request. Ignoring.";
284+
"signature" => %signature,
285+
"block_signer_sighash" => %block_sighash,
286+
"slot_id" => slot_id,
287+
"signer_set" => self.signer_set,
288+
);
289+
continue;
293290
};
294291

295292
let Ok(valid_sig) = signer_pubkey.verify(block_sighash.bits(), &signature)

0 commit comments

Comments
 (0)