diff options
| author | Matt Corallo <[email protected]> | 2019-01-17 14:33:16 +1000 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2019-05-02 15:11:03 -0400 |
| commit | 7df16e70e67c753c871797ce947ea09d7cb0e519 (patch) | |
| tree | cbd6c498379f6ad3b23d0be1f997b78f61116e0e /src/net_processing.cpp | |
| parent | [refactor] Drop redundant nDoS, corruptionPossible, SetCorruptionPossible (diff) | |
| download | discoin-7df16e70e67c753c871797ce947ea09d7cb0e519.tar.xz discoin-7df16e70e67c753c871797ce947ea09d7cb0e519.zip | |
LookupBlockIndex -> CACHED_INVALID
Co-authored-by: Anthony Towns <[email protected]>
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 a416093db..5c5faa130 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. // |