aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index a416093db1..5c5faa1304 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -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.
//