Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/check block state check in validate reject #5396

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions stacks-signer/src/v0/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,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 @@ -563,7 +562,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
Loading