diff --git a/src/node/blockstorage.h b/src/node/blockstorage.h index 3fb6cc3e5bf..0a2f99bb85d 100644 --- a/src/node/blockstorage.h +++ b/src/node/blockstorage.h @@ -136,6 +136,7 @@ using BlockMap = std::unordered_map; struct CBlockIndexWorkComparator { bool operator()(const CBlockIndex* pa, const CBlockIndex* pb) const; + using is_transparent = void; }; struct CBlockIndexHeightOnlyComparator { diff --git a/src/validation.cpp b/src/validation.cpp index fe4237db2c8..6cf3a31c74f 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5401,7 +5401,7 @@ void ChainstateManager::CheckBlockIndex() const // needs to be added if it is an ancestor of the target // block. if (!c->TargetBlock() || c->TargetBlock()->GetAncestor(pindex->nHeight) == pindex) { - assert(c->setBlockIndexCandidates.contains(const_cast(pindex))); + assert(c->setBlockIndexCandidates.contains(pindex)); } } // If some parent is missing, then it could be that this block was in @@ -5409,7 +5409,7 @@ void ChainstateManager::CheckBlockIndex() const // In this case it must be in m_blocks_unlinked -- see test below. } } else { // If this block sorts worse than the current tip or some ancestor's block has never been seen, it cannot be in setBlockIndexCandidates. - assert(!c->setBlockIndexCandidates.contains(const_cast(pindex))); + assert(!c->setBlockIndexCandidates.contains(pindex)); } } // Check whether this block is in m_blocks_unlinked. @@ -5441,7 +5441,7 @@ void ChainstateManager::CheckBlockIndex() const // So if this block is itself better than any m_chain.Tip() and it wasn't in // setBlockIndexCandidates, then it must be in m_blocks_unlinked. for (const auto& c : m_chainstates) { - if (!CBlockIndexWorkComparator()(pindex, c->m_chain.Tip()) && !c->setBlockIndexCandidates.contains(const_cast(pindex))) { + if (!CBlockIndexWorkComparator()(pindex, c->m_chain.Tip()) && !c->setBlockIndexCandidates.contains(pindex)) { if (pindexFirstInvalid == nullptr) { if (!c->TargetBlock() || c->TargetBlock()->GetAncestor(pindex->nHeight) == pindex) { assert(foundInUnlinked);