@@ -5400,22 +5400,26 @@ void ChainstateManager::CheckBlockIndex()
5400
5400
if (pindexFirstInvalid == nullptr ) {
5401
5401
// Checks for not-invalid blocks.
5402
5402
printf (" pindexFirstInvalid == nullptr : %s\n " , pindex->ToString ().c_str ());
5403
- if (ActiveChain ().Contains (pindex)) {
5404
- printf (" failed mask not set in main chain\n " );
5405
- assert ((pindex->nStatus & BLOCK_FAILED_MASK) == 0 ); // The failed mask cannot be set for blocks without invalid parents.
5406
- }
5407
- }
5408
- else if (pindexFirstInvalid != pindex) {
5409
- // pindexFirstInvalid -> ...... -> pindex
5410
- // we check that descendants are BLOCK_FAILED_CHILD and not BLOCK_FAILED_VALID
5411
- printf (" pindexFirstInvalid != pindex : %s\n " , pindex->ToString ().c_str ());
5412
- assert ((pindex->nStatus & BLOCK_FAILED_VALID) == 0 );
5413
- assert (pindex->nStatus & BLOCK_FAILED_CHILD);
5403
+ assert ((pindex->nStatus & BLOCK_FAILED_MASK) == 0 ); // The failed mask cannot be set for blocks without invalid parents.
5404
+ // if (ActiveChain().Contains(pindex)) {
5405
+ // printf("failed mask not set in main chain\n");
5406
+ // assert((pindex->nStatus & BLOCK_FAILED_MASK) == 0); // The failed mask cannot be set for blocks without invalid parents.
5407
+ // }
5414
5408
} else {
5415
- printf (" pindexFirstInvalid == pindex : %s\n " , pindex->ToString ().c_str ());
5416
- assert (pindex->nStatus & BLOCK_FAILED_VALID);
5417
- assert ((pindex->nStatus & BLOCK_FAILED_CHILD) == 0 );
5418
- }
5409
+ printf (" pindexFirstInvalid != nullptr : %s\n " , pindex->ToString ().c_str ());
5410
+ assert (pindex->nStatus & BLOCK_FAILED_MASK);
5411
+ }
5412
+ // else if (pindexFirstInvalid != pindex) {
5413
+ // // pindexFirstInvalid -> ...... -> pindex
5414
+ // // we check that descendants are BLOCK_FAILED_CHILD and not BLOCK_FAILED_VALID
5415
+ // printf("pindexFirstInvalid != pindex : %s\n", pindex->ToString().c_str());
5416
+ // assert((pindex->nStatus & BLOCK_FAILED_VALID) == 0);
5417
+ // assert(pindex->nStatus & BLOCK_FAILED_CHILD);
5418
+ // } else {
5419
+ // printf("pindexFirstInvalid == pindex : %s\n", pindex->ToString().c_str());
5420
+ // assert(pindex->nStatus & BLOCK_FAILED_VALID);
5421
+ // assert((pindex->nStatus & BLOCK_FAILED_CHILD) == 0);
5422
+ // }
5419
5423
// Make sure m_chain_tx_count sum is correctly computed.
5420
5424
if (!pindex->pprev ) {
5421
5425
// If no previous block, nTx and m_chain_tx_count must be the same.
0 commit comments