Skip to content

Commit

Permalink
add more todos
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Jul 16, 2024
1 parent 5ff252d commit 17d3cfc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Blockchain/Sources/Blockchain/Safrole.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public enum SafroleError: Error {
case tooManyExtrinsics
case extrinsicsNotAllowed
case extrinsicsNotSorted
case extrinsicsTooLow
case extrinsicsNotUnique
case hashingError
case decodingError
case unspecified
Expand Down Expand Up @@ -293,7 +295,9 @@ extension Safrole {
}

newTicketsAccumulatorArr.insertSorted(newTickets)
// TODO: check for extrinsicsNotUnique
if newTicketsAccumulatorArr.count > config.value.epochLength {
// TODO: check for extrinsicsTooLow
newTicketsAccumulatorArr.removeLast(newTicketsAccumulatorArr.count - config.value.epochLength)
}

Expand Down

0 comments on commit 17d3cfc

Please sign in to comment.