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

fix: missing tip block on tips selection #2367

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Changes from all commits
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
12 changes: 8 additions & 4 deletions libraries/core_libs/consensus/src/dag/dag_block_proposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,14 @@ vec_blk_t DagBlockProposer::selectDagBlockTips(const vec_blk_t& frontier_tips, u
// Retrieve all the tips blocks and identify duplicate proposer tips
for (const auto& t : frontier_tips) {
auto tip_block = dag_mgr_->getDagBlock(t);
assert(tip_block != nullptr);
tips_blocks.insert({t, tip_block});
if (!proposers.insert(tip_block->getSender()).second) {
duplicate_proposers.insert(tip_block->getSender());
if (tip_block == nullptr) {
// This could happen if a tip block has expired, exclude this tip
LOG(log_nf_) << "selectDagBlockTips, Cannot find tip dag block " << tip_block;
} else {
tips_blocks.insert({t, tip_block});
if (!proposers.insert(tip_block->getSender()).second) {
duplicate_proposers.insert(tip_block->getSender());
}
}
}

Expand Down