6 #ifndef KAGOME_CORE_CONSENSUS_BABE_IMPL_BABE_DIGESTS_UTIL_HPP 7 #define KAGOME_CORE_CONSENSUS_BABE_IMPL_BABE_DIGESTS_UTIL_HPP 28 template <
typename T,
typename VarT>
31 return visit_in_place(
32 std::forward<VarT>(v),
33 [](
const T &expected_val)
34 -> std::optional<std::reference_wrapper<
const std::decay_t<T>>> {
37 [](
const auto &) {
return std::nullopt; });
50 #endif // KAGOME_CORE_CONSENSUS_BABE_IMPL_BABE_DIGESTS_UTIL_HPP
std::optional< std::reference_wrapper< const std::decay_t< T > > > getFromVariant(VarT &&v)
outcome::result< std::pair< Seal, BabeBlockHeader > > getBabeDigests(const primitives::BlockHeader &block_header)
outcome::result< EpochDigest > getNextEpochDigest(const primitives::BlockHeader &header)
OUTCOME_HPP_DECLARE_ERROR(kagome::api, JRpcServerImpl::Error)