@@ -2830,8 +2830,9 @@ bool Chainstate::DisconnectTip(BlockValidationState& state, DisconnectedBlockTra
28302830 {
28312831 CCoinsViewCache view (&CoinsTip ());
28322832 assert (view.GetBestBlock () == pindexDelete->GetBlockHash ());
2833- if (DisconnectBlock (block, pindexDelete, view) != DISCONNECT_OK)
2833+ if (DisconnectBlock (block, pindexDelete, view) != DISCONNECT_OK) {
28342834 return error (" DisconnectTip(): DisconnectBlock %s failed" , pindexDelete->GetBlockHash ().ToString ());
2835+ }
28352836 bool flushed = view.Flush ();
28362837 assert (flushed);
28372838 }
@@ -4358,12 +4359,15 @@ bool TestBlockValidity(BlockValidationState& state,
43584359 indexDummy.phashBlock = &block_hash;
43594360
43604361 // NOTE: CheckBlockHeader is called by CheckBlock
4361- if (!ContextualCheckBlockHeader (block, state, chainstate.m_blockman , chainstate.m_chainman , pindexPrev))
4362+ if (!ContextualCheckBlockHeader (block, state, chainstate.m_blockman , chainstate.m_chainman , pindexPrev)) {
43624363 return error (" %s: Consensus::ContextualCheckBlockHeader: %s" , __func__, state.ToString ());
4363- if (!CheckBlock (block, state, chainparams.GetConsensus (), fCheckPOW , fCheckMerkleRoot ))
4364+ }
4365+ if (!CheckBlock (block, state, chainparams.GetConsensus (), fCheckPOW , fCheckMerkleRoot )) {
43644366 return error (" %s: Consensus::CheckBlock: %s" , __func__, state.ToString ());
4365- if (!ContextualCheckBlock (block, state, chainstate.m_chainman , pindexPrev))
4367+ }
4368+ if (!ContextualCheckBlock (block, state, chainstate.m_chainman , pindexPrev)) {
43664369 return error (" %s: Consensus::ContextualCheckBlock: %s" , __func__, state.ToString ());
4370+ }
43674371 if (!chainstate.ConnectBlock (block, state, &indexDummy, viewNew, true )) {
43684372 return false ;
43694373 }
@@ -4591,7 +4595,9 @@ bool Chainstate::ReplayBlocks()
45914595
45924596 std::vector<uint256> hashHeads = db.GetHeadBlocks ();
45934597 if (hashHeads.empty ()) return true ; // We're already in a consistent state.
4594- if (hashHeads.size () != 2 ) return error (" ReplayBlocks(): unknown inconsistent state" );
4598+ if (hashHeads.size () != 2 ) {
4599+ return error (" ReplayBlocks(): unknown inconsistent state" );
4600+ }
45954601
45964602 m_chainman.GetNotifications ().progress (_ (" Replaying blocks…" ), 0 , false );
45974603 LogPrintf (" Replaying blocks\n " );
0 commit comments