From 7df16e70e67c753c871797ce947ea09d7cb0e519 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 17 Jan 2019 14:33:16 +1000 Subject: LookupBlockIndex -> CACHED_INVALID Co-authored-by: Anthony Towns --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net_processing.cpp') 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. // -- cgit v1.2.3