Skip to content

Commit

Permalink
Add sleep after failed validation (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
monstrobishi authored May 30, 2021
1 parent 1680529 commit c7a83e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,9 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
// problems.
return AbortNode(state, "Corrupt block found indicating potential hardware failure; shutting down");
}

// Add sleep here to avoid hot looping over failed but not invalidated block.
std::this_thread::sleep_for(std::chrono::milliseconds(100));
return error("%s: Consensus::CheckBlock: %s", __func__, FormatStateMessage(state));
}

Expand Down

0 comments on commit c7a83e0

Please sign in to comment.