15 std::shared_ptr<consensus::BabeDigestObserver> babe_update_observer,
16 std::shared_ptr<authority::AuthorityUpdateObserver>
17 authority_update_observer)
18 : babe_digest_observer_(
std::move(babe_update_observer)),
19 authority_update_observer_(
std::move(authority_update_observer)),
20 logger_(log::
createLogger(
"DigestTracker",
"digest_tracker")) {
27 SL_TRACE(
logger_,
"Start process digest on block {}", block);
28 for (
auto &item : digest) {
29 auto res = visit_in_place(
33 "Consensus-digest on block {}, engine '{}'",
40 "Seal-digest on block {}, engine '{}'",
43 return outcome::success();
47 "PreRuntime-digest on block {}, engine '{}'",
54 logger_,
"RuntimeEnvironmentUpdated-digest on block {}", block);
55 return outcome::success();
59 "Unsupported digest on block {}: variant #{}",
62 return outcome::success();
66 SL_TRACE(
logger_,
"End process digest on block {}", block);
67 return outcome::success();
91 OUTCOME_TRY(digest, scale::decode<primitives::BabeDigest>(message.
data));
100 "Unsupported consensus engine id in block {}: {}",
103 return outcome::success();
107 "Unknown consensus engine id in block {}: {}",
110 return outcome::success();
119 scale::decode<consensus::BabeBlockHeader>(message.
data));
124 "Unknown consensus engine id in block {}: {}",
127 return outcome::success();
Runtime code or heap pages updated.
std::shared_ptr< authority::AuthorityUpdateObserver > authority_update_observer_
ConsensusEngineId consensus_engine_id
outcome::result< void > onDigest(const primitives::BlockInfo &block, const primitives::Digest &digest) override
const auto kUnsupportedEngineId_POL1
std::shared_ptr< consensus::BabeDigestObserver > babe_digest_observer_
const auto kUnsupportedEngineId_BEEF
std::string toString() const noexcept
outcome::result< void > onConsensus(const primitives::BlockInfo &block, const primitives::Consensus &consensus_message)
outcome::result< void > onPreRuntime(const primitives::BlockInfo &block, const primitives::PreRuntime &message)
common::SLBuffer< consensus::kMaxValidatorsNumber *1024 > data
const auto kGrandpaEngineId
Logger createLogger(const std::string &tag)
void cancel(const primitives::BlockInfo &block) override
DigestTrackerImpl(std::shared_ptr< consensus::BabeDigestObserver > babe_update_observer, std::shared_ptr< authority::AuthorityUpdateObserver > authority_update_observer)