6 #ifndef KAGOME_CONSENSUS_BLOCKAPPENDERIMPL 7 #define KAGOME_CONSENSUS_BLOCKAPPENDERIMPL 11 #include <libp2p/peer/peer_id.hpp> 24 class BabeConfigRepository;
25 class ConsistencyKeeper;
36 public std::enable_shared_from_this<BlockAppenderImpl> {
38 enum class Error { INVALID_BLOCK = 1, PARENT_NOT_FOUND };
41 std::shared_ptr<blockchain::BlockTree> block_tree,
42 std::shared_ptr<consensus::babe::BabeConfigRepository> babe_config_repo,
43 std::shared_ptr<BlockValidator> block_validator,
44 std::shared_ptr<grandpa::Environment> grandpa_environment,
45 std::shared_ptr<crypto::Hasher> hasher,
46 std::shared_ptr<blockchain::DigestTracker> digest_tracker,
47 std::shared_ptr<BabeUtil> babe_util,
48 std::shared_ptr<babe::ConsistencyKeeper> consistency_keeper);
52 outcome::result<void> applyJustification(
72 std::chrono::high_resolution_clock::time_point time;
83 #endif // KAGOME_CONSENSUS_BLOCKAPPENDERIMPL std::shared_ptr< BabeUtil > babe_util_
std::map< primitives::BlockInfo, primitives::Justification > justifications_
std::shared_ptr< crypto::Hasher > hasher_
std::shared_ptr< grandpa::Environment > grandpa_environment_
std::shared_ptr< blockchain::BlockTree > block_tree_
std::shared_ptr< soralog::Logger > Logger
OUTCOME_HPP_DECLARE_ERROR(kagome::consensus, BlockAppenderImpl::Error)
std::optional< primitives::BlockInfo > last_appended_
std::shared_ptr< consensus::babe::BabeConfigRepository > babe_config_repo_
std::shared_ptr< BlockValidator > block_validator_
std::shared_ptr< babe::ConsistencyKeeper > consistency_keeper_
std::shared_ptr< blockchain::DigestTracker > digest_tracker_