src/blockchain/impl/block_header_repository.cpp
auto BlockHeaderRepository::getHashById(const primitives::BlockId &id) const
      -> outcome::result<base::Hash256> {
    return visit_in_place(
        id,
        [this](const primitives::BlockNumber &n) { return getHashByNumber(n); },
        [](const base::Hash256 &hash) { return hash; });
  }
/**
   * @param id of a block which hash is returned
   * @return block hash or a none optional if the corresponding block header
   * is not in storage or a storage error
   */
@param id of a block which hash is returned
@return block hash or a none optional if the corresponding block header
is not in storage or a storage error
@param id of a block which hash is returned @return block hash or a none optional if the corresponding block header is not in storage or a storage error
auto BlockHeaderRepository::getHashById(const primitives::BlockId &id) const
      -> outcome::result<base::Hash256> {
    return visit_in_place(
        id,
        [this](const primitives::BlockNumber &n) { return getHashByNumber(n); },
        [](const base::Hash256 &hash) { return hash; });
  }
auto BlockHeaderRepository :: getHashById ( const primitives :: BlockId & id ) const -> outcome :: result < base :: Hash256 > { return visit_in_place ( id , [ this ] ( const primitives :: BlockNumber & n ) { return getHashByNumber ( n ) ; } , [ ] ( const base :: Hash256 & hash ) { return hash ; } ) ; }
@param id of a block which hash is returned
 @return block hash or a none optional if the corresponding block header
 is not in storage or a storage error
@param id of a block which hash is returned @return block hash or a none optional if the corresponding block header is not in storage or a storage error