ForkChoice: remove an impossible case for parent_checkpoints (#4626)

`parent_finalized.epoch + 1 > block_epoch` will never be `true` since as the comment says:

```
 A block in epoch `N` cannot contain attestations which would finalize an epoch higher than `N - 1`.
```
This commit is contained in:
zhiqiangxu 2023-08-21 05:02:33 +00:00
parent 20067b9465
commit b3e1c297c8

View File

@ -750,7 +750,7 @@ where
.unrealized_justified_checkpoint .unrealized_justified_checkpoint
.zip(parent_block.unrealized_finalized_checkpoint) .zip(parent_block.unrealized_finalized_checkpoint)
.filter(|(parent_justified, parent_finalized)| { .filter(|(parent_justified, parent_finalized)| {
parent_justified.epoch == block_epoch && parent_finalized.epoch + 1 >= block_epoch parent_justified.epoch == block_epoch && parent_finalized.epoch + 1 == block_epoch
}); });
let (unrealized_justified_checkpoint, unrealized_finalized_checkpoint) = if let Some(( let (unrealized_justified_checkpoint, unrealized_finalized_checkpoint) = if let Some((