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

Remove use of Option<BlockHeight> as a query for blocks #2005

Open
MitchTurner opened this issue Jul 2, 2024 · 0 comments · May be fixed by #2033
Open

Remove use of Option<BlockHeight> as a query for blocks #2005

MitchTurner opened this issue Jul 2, 2024 · 0 comments · May be fixed by #2033
Labels
good first issue Good for newcomers

Comments

@MitchTurner
Copy link
Member

There are a number of places we use Option<BlockHeight> to represent the block, where None is the genesis block. This is confusing, as it's implicit what None means without looking at the code.

Instead, we should introduce some type with the same cardinality, but with explicit names:

something like

enum BlockQuery {
    Specific(BlockHeight),
    Genesis,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant