Skip to content

Commit 41c0369

Browse files
committed
Do not attempt to process a block validation response for an already globally processed block
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent 38ae702 commit 41c0369

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

stacks-signer/src/v0/signer.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,16 @@ impl Signer {
563563
.signer_db
564564
.block_lookup(self.reward_cycle, &signer_signature_hash)
565565
{
566-
Ok(Some(block_info)) => block_info,
566+
Ok(Some(block_info)) => {
567+
if block_info.state == BlockState::GloballyRejected
568+
|| block_info.state == BlockState::GloballyAccepted
569+
{
570+
debug!("{self}: Received block validation for a block that is already marked as {}. Ignoring...", block_info.state);
571+
return None;
572+
} else {
573+
block_info
574+
}
575+
}
567576
Ok(None) => {
568577
// We have not seen this block before. Why are we getting a response for it?
569578
debug!("{self}: Received a block validate response for a block we have not seen before. Ignoring...");

0 commit comments

Comments
 (0)