diff options
author | Matt Corallo <git@bluematt.me> | 2019-01-17 14:33:16 +1000 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2019-05-02 15:11:03 -0400 |
commit | 7df16e70e67c753c871797ce947ea09d7cb0e519 (patch) | |
tree | cbd6c498379f6ad3b23d0be1f997b78f61116e0e /src/net_processing.cpp | |
parent | c8b0d22698385f91215ce8145631e3d5826dc977 (diff) |
LookupBlockIndex -> CACHED_INVALID
Co-authored-by: Anthony Towns <aj@erisian.com.au>
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 2 |
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. // |