Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epochs::default()uses block height 0 as the first block height of the first epoch #378

Closed
james-chf opened this issue Aug 24, 2022 · 1 comment
Assignees
Labels

Comments

@james-chf
Copy link
Contributor

james-chf commented Aug 24, 2022

In our Epochs struct, we should ensure we are returning BlockHeight(1) as the first block height of the first epoch, rather than BlockHeight(0). This may work for tests but BlockHeight(0) is not a realistic block height for real Tendermint chains.

impl Default for Epochs {
/// Initialize predecessor epochs, assuming starting on the epoch 0 and
/// block height 0.
fn default() -> Self {
Self {
first_known_epoch: Epoch::default(),
first_block_heights: vec![BlockHeight::default()],
}
}
}

Related: #377

@tzemanovic
Copy link
Member

duplicate of #648

@tzemanovic tzemanovic closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants