Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
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
3 changes: 2 additions & 1 deletion client/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,8 @@ impl<Block: BlockT> Backend<Block> {
}

if !existing_header {
{
// Add a new leaf if the block is outside the block gap.
if block_gap.map_or(true, |(start, _)| number != start) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be number < start || number > end?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or can we not just directly check that number > last_finalized_state?

let mut leaves = self.blockchain.leaves.write();
leaves.import(hash, number, parent_hash);
leaves.prepare_transaction(
Expand Down