Skip to content

Commit

Permalink
Fix comments that described old definition of min/maxCommittableAge
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrm50 committed Aug 10, 2023
1 parent ae626cf commit 8ee005a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions block.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,6 @@ func (b *ProtocolBlock) syntacticallyValidate(api API) error {
}
}

// The "+1" element is there because we're comparing against 'blockIndex' which is in the middle of a slot
// and the oldest possible committed slot is 'minCommittableAge' full slots in the past.
// So we need to subtract 1 to account for the blockIndex slot that is not finished yet.
minCommittableAge := api.ProtocolParameters().MinCommittableAge()
maxCommittableAge := api.ProtocolParameters().MaxCommittableAge()
commitmentIndex := b.SlotCommitmentID.Index()
Expand Down Expand Up @@ -430,9 +427,6 @@ func (b *BasicBlock) syntacticallyValidate(api API, protocolBlock *ProtocolBlock
}
blockIndex := blockID.Index()

// The "+1" element is there because we're comparing against 'blockIndex' which is in the middle of a slot
// and the latest possible committed slot is 'min/maxCommittableAge' full slots in the past.
// So we need to add 1 to an account for the blockIndex slot that is not finished yet.
minCommittableAge := api.ProtocolParameters().MinCommittableAge()
maxCommittableAge := api.ProtocolParameters().MaxCommittableAge()

Expand Down

0 comments on commit 8ee005a

Please sign in to comment.