mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
validator/consensus: check fork proposals are after the requested tip height before appending them in get_fork_proposals_after
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user