validator/consensus: check fork proposals are after the requested tip height before appending them in get_fork_proposals_after

This commit is contained in:
skoupidi
2026-02-11 15:05:15 +02:00
parent 8753c20c1b
commit e4ce356952

View File

@@ -385,7 +385,10 @@ impl Consensus {
.unwrap()
.get_blocks_by_hash(&self.forks[index].proposals)?;
for block in blocks {
proposals.push(Proposal::new(block));
// Add fork proposals after the requested one height
if block.header.height > existing_tips[0].header.height {
proposals.push(Proposal::new(block));
}
}
Ok(proposals)