LookupBlockIndex -> CACHED_INVALID
Co-authored-by: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
parent
c8b0d22698
commit
7df16e70e6
1 changed files with 1 additions and 1 deletions
|
@ -1578,7 +1578,7 @@ bool static ProcessHeadersMessage(CNode *pfrom, CConnman *connman, const std::ve
|
|||
CBlockHeader first_invalid_header;
|
||||
if (!ProcessNewBlockHeaders(headers, state, chainparams, &pindexLast, &first_invalid_header)) {
|
||||
if (state.IsInvalid()) {
|
||||
if (punish_duplicate_invalid && LookupBlockIndex(first_invalid_header.GetHash())) {
|
||||
if (punish_duplicate_invalid && state.GetReason() == ValidationInvalidReason::CACHED_INVALID) {
|
||||
// Goal: don't allow outbound peers to use up our outbound
|
||||
// connection slots if they are on incompatible chains.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue