src/omnicore/utilsbitcoin.cpp
/**
 * @return The CBlockIndex, or nullptr, if the block isn't available.
 */
@return The CBlockIndex, or nullptr, if the block isn't available.
@return The CBlockIndex or nullptr if the block isn ' t available .
CBlockIndex* GetBlockIndex(const uint256& hash)
{
    CBlockIndex* pBlockIndex = nullptr;
    LOCK(cs_main);
    BlockMap::const_iterator it = mapBlockIndex.find(hash);
    if (it != mapBlockIndex.end()) {
        pBlockIndex = it->second;
    }
    return pBlockIndex;
}
CBlockIndex * GetBlockIndex ( const uint256 & hash ) { CBlockIndex * pBlockIndex = nullptr ; LOCK ( cs_main ) ; BlockMap :: const_iterator it = mapBlockIndex . find ( hash ) ; if ( it != mapBlockIndex . end ( ) ) { pBlockIndex = it -> second ; } return pBlockIndex ; }
@return The CBlockIndex, or nullptr, if the block isn't available.
@return The CBlockIndex or nullptr if the block isn ' t available .