Add comment regarding tightening block val.

Comment was suggested by Danny R.
This commit is contained in:
Paul Hauner 2018-10-12 19:30:52 +11:00
parent 68ca51c7ac
commit b5441535ba
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C

View File

@ -136,6 +136,10 @@ impl<T> BlockValidationContext<T>
* function) and it comes from a slot that is already finalized, drop the block. * function) and it comes from a slot that is already finalized, drop the block.
* *
* If a slot is finalized, there's no point in considering any other blocks for that slot. * If a slot is finalized, there's no point in considering any other blocks for that slot.
*
* TODO: We can more strongly throw away blocks based on the `last_finalized_block` related
* to this `last_finalized_slot`. Namely, any block in a future slot must include the
* `last_finalized_block` in it's chain.
*/ */
if block_slot <= self.last_finalized_slot { if block_slot <= self.last_finalized_slot {
return Err(SszBlockValidationError::SlotAlreadyFinalized); return Err(SszBlockValidationError::SlotAlreadyFinalized);