@@ -3205,7 +3205,7 @@ bool BlockManager::AcceptBlockHeader(const CBlockHeader& block, BlockValidationS
3205
3205
if (ppindex)
3206
3206
*ppindex = pindex;
3207
3207
if (pindex->nStatus & BLOCK_FAILED_MASK) {
3208
- LogPrintf ( " ERROR: %s: block %s is marked invalid\n " , __func__, hash.ToString ());
3208
+ LogPrint (BCLog::VALIDATION, " %s: block %s is marked invalid\n " , __func__, hash.ToString ());
3209
3209
return state.Invalid (BlockValidationResult::BLOCK_CACHED_INVALID, " duplicate" );
3210
3210
}
3211
3211
return true ;
@@ -3220,16 +3220,18 @@ bool BlockManager::AcceptBlockHeader(const CBlockHeader& block, BlockValidationS
3220
3220
CBlockIndex* pindexPrev = nullptr ;
3221
3221
BlockMap::iterator mi = m_block_index.find (block.hashPrevBlock );
3222
3222
if (mi == m_block_index.end ()) {
3223
- LogPrintf ( " ERROR: %s: %s prev block not found\n " , __func__, hash.ToString ());
3223
+ LogPrint (BCLog::VALIDATION, " %s: %s prev block not found\n " , __func__, hash.ToString ());
3224
3224
return state.Invalid (BlockValidationResult::BLOCK_MISSING_PREV, " prev-blk-not-found" );
3225
3225
}
3226
3226
pindexPrev = (*mi).second ;
3227
3227
if (pindexPrev->nStatus & BLOCK_FAILED_MASK) {
3228
- LogPrintf ( " ERROR: %s: %s prev block invalid\n " , __func__, hash.ToString ());
3228
+ LogPrint (BCLog::VALIDATION, " %s: %s prev block invalid\n " , __func__, hash.ToString ());
3229
3229
return state.Invalid (BlockValidationResult::BLOCK_INVALID_PREV, " bad-prevblk" );
3230
3230
}
3231
- if (!ContextualCheckBlockHeader (block, state, *this , chainparams, pindexPrev, GetAdjustedTime ()))
3232
- return error (" %s: Consensus::ContextualCheckBlockHeader: %s, %s" , __func__, hash.ToString (), state.ToString ());
3231
+ if (!ContextualCheckBlockHeader (block, state, *this , chainparams, pindexPrev, GetAdjustedTime ())) {
3232
+ LogPrint (BCLog::VALIDATION, " %s: Consensus::ContextualCheckBlockHeader: %s, %s\n " , __func__, hash.ToString (), state.ToString ());
3233
+ return false ;
3234
+ }
3233
3235
3234
3236
/* Determine if this block descends from any block which has been found
3235
3237
* invalid (m_failed_blocks), then mark pindexPrev and any blocks between
@@ -3264,7 +3266,7 @@ bool BlockManager::AcceptBlockHeader(const CBlockHeader& block, BlockValidationS
3264
3266
setDirtyBlockIndex.insert (invalid_walk);
3265
3267
invalid_walk = invalid_walk->pprev ;
3266
3268
}
3267
- LogPrintf ( " ERROR: %s: %s prev block invalid\n " , __func__, hash.ToString ());
3269
+ LogPrint (BCLog::VALIDATION, " %s: %s prev block invalid\n " , __func__, hash.ToString ());
3268
3270
return state.Invalid (BlockValidationResult::BLOCK_INVALID_PREV, " bad-prevblk" );
3269
3271
}
3270
3272
}
0 commit comments