Skip to content

Commit

Permalink
Merge pull request #5396 from stacks-network/fix/check-block-state-in…
Browse files Browse the repository at this point in the history
…-validate-reject

Fix/check block state check in validate reject
  • Loading branch information
hstove authored Oct 29, 2024
2 parents 452fbaf + 3d67fcb commit a63b1e5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions stacks-signer/src/v0/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,8 @@ impl Signer {
{
debug!("{self}: Received block validation for a block that is already marked as {}. Ignoring...", block_info.state);
return None;
} else {
block_info
}
block_info
}
Ok(None) => {
// We have not seen this block before. Why are we getting a response for it?
Expand Down Expand Up @@ -569,7 +568,15 @@ impl Signer {
.signer_db
.block_lookup(self.reward_cycle, &signer_signature_hash)
{
Ok(Some(block_info)) => block_info,
Ok(Some(block_info)) => {
if block_info.state == BlockState::GloballyRejected
|| block_info.state == BlockState::GloballyAccepted
{
debug!("{self}: Received block validation for a block that is already marked as {}. Ignoring...", block_info.state);
return None;
}
block_info
}
Ok(None) => {
// We have not seen this block before. Why are we getting a response for it?
debug!("{self}: Received a block validate response for a block we have not seen before. Ignoring...");
Expand Down

0 comments on commit a63b1e5

Please sign in to comment.