diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-07-15 10:39:38 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-07-15 14:53:58 +0200 |
commit | fa56eda58e5ec2f2345bbe14c798e83f2abb4728 (patch) | |
tree | c738d491e49f786ffdf7fcc270245c0df8a29282 /src | |
parent | fa492895b572a1196ca8652006b6fc2fa1d16951 (diff) |
log: Avoid treating remote misbehvior as local system error
Diffstat (limited to 'src')
-rw-r--r-- | src/validation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index b90ff440be..23802b3474 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3641,8 +3641,10 @@ bool BlockManager::AcceptBlockHeader(const CBlockHeader& block, BlockValidationS return true; } - if (!CheckBlockHeader(block, state, chainparams.GetConsensus())) - return error("%s: Consensus::CheckBlockHeader: %s, %s", __func__, hash.ToString(), state.ToString()); + if (!CheckBlockHeader(block, state, chainparams.GetConsensus())) { + LogPrint(BCLog::VALIDATION, "%s: Consensus::CheckBlockHeader: %s, %s\n", __func__, hash.ToString(), state.ToString()); + return false; + } // Get prev block index CBlockIndex* pindexPrev = nullptr; |