Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove justification requests #1898

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions core/consensus/grandpa/impl/grandpa_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,41 +527,6 @@ namespace kagome::consensus::grandpa {
if (msg.voter_set_id < current_round_->voterSetId()) {
return;
}

if (msg.last_finalized > block_tree_->getLastFinalized().number) {
// Trying to substitute with justifications' request only
main_thread_context_.execute([wself{weak_from_this()},
peer_id,
last_finalized{
block_tree_->getLastFinalized()},
msg{std::move(msg)}]() mutable {
if (auto self = wself.lock()) {
self->synchronizer_->syncMissingJustifications(
peer_id,
last_finalized,
std::nullopt,
[wp{wself}, last_finalized, msg](auto res) {
auto self = wp.lock();
if (not self) {
return;
}
if (res.has_error()) {
SL_DEBUG(self->logger_,
"Missing justifications between blocks {} and "
"{} was not loaded: {}",
last_finalized,
msg.last_finalized,
res.error());
} else {
SL_DEBUG(self->logger_,
"Loaded justifications for blocks in range {} - {}",
last_finalized,
res.value());
}
});
}
});
}
}

void GrandpaImpl::onCatchUpRequest(
Expand Down
Loading
Loading