Skip to content

Commit

Permalink
fixup! remove unnecessary Epochs methods
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Sep 21, 2023
1 parent 49411db commit 4a83bbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/types/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,9 +1170,9 @@ impl Epochs {
self.first_block_heights.push(block_height);
}

/// Look up the epoch of a given block height.
/// TODO: handle passing of a future block height? (only valid for current
/// or past)
/// Look up the epoch of a given block height. If the given height is
/// greater than the current height, the current epoch will be returned even
/// though an epoch for a future block cannot be determined.
pub fn get_epoch(&self, block_height: BlockHeight) -> Option<Epoch> {
if let Some((_first_known_epoch_height, rest)) =
self.first_block_heights.split_first()
Expand Down

0 comments on commit 4a83bbe

Please sign in to comment.