From 670086041fb91f6daae0435fedaae29cbf92f781 Mon Sep 17 00:00:00 2001 From: iceseer Date: Mon, 15 Apr 2024 14:10:09 +0300 Subject: [PATCH] fixup! Signed-off-by: iceseer --- core/common/ref_cache.hpp | 2 +- .../validator/impl/parachain_processor.cpp | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/core/common/ref_cache.hpp b/core/common/ref_cache.hpp index 47ab5137e8..b72036ca4b 100644 --- a/core/common/ref_cache.hpp +++ b/core/common/ref_cache.hpp @@ -118,4 +118,4 @@ namespace kagome { Container items_; }; -} // namespace kagome \ No newline at end of file +} // namespace kagome diff --git a/core/parachain/validator/impl/parachain_processor.cpp b/core/parachain/validator/impl/parachain_processor.cpp index f946834c51..7dc57bee05 100644 --- a/core/parachain/validator/impl/parachain_processor.cpp +++ b/core/parachain/validator/impl/parachain_processor.cpp @@ -805,11 +805,11 @@ namespace kagome::parachain { grid::makeViews(session_info.validator_groups, session_info.active_validator_indices, validator_index); + Groups g{session_info.validator_groups, minimum_backing_votes}; return RefCache::RefObj( PerSessionState{ .session_info = std::move(session_info), - .groups = Groups{session_info.validator_groups, - minimum_backing_votes}, + .groups = std::move(g), .grid_view = grid_view, }); }); @@ -869,8 +869,11 @@ namespace kagome::parachain { std::unordered_map authority_lookup; - for (ValidatorIndex v = 0; v < session_info->discovery_keys.size(); ++v) { - authority_lookup[session_info->discovery_keys[v]] = v; + for (ValidatorIndex v = 0; + v < per_session_state->value().session_info.discovery_keys.size(); + ++v) { + authority_lookup[per_session_state->value() + .session_info.discovery_keys[v]] = v; } std::optional statement_store; @@ -4040,10 +4043,13 @@ namespace kagome::parachain { const SignedFullStatementWithPVD &statement) { const CandidateHash candidate_hash = candidateHashFrom(getPayload(statement)); - SL_TRACE(logger_, - "Sharing statement. (relay parent={}, candidate hash={})", - relay_parent, - candidate_hash); + SL_TRACE( + logger_, + "Sharing statement. (relay parent={}, candidate hash={}, our_index={}, statement_ix={})", + relay_parent, + candidate_hash, + *per_relay_parent.our_index, + statement.payload.ix); BOOST_ASSERT(per_relay_parent.our_index);