From fa56eda58e5ec2f2345bbe14c798e83f2abb4728 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 15 Jul 2020 10:39:38 +0200 Subject: [PATCH] log: Avoid treating remote misbehvior as local system error --- src/validation.cpp | 6 ++++-- 1 file 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;