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 · 3 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 · 3 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,
}
@abdegenius
Copy link

Hey @MitchTurner i can work on this issue.. should i go ahead and take it up?!

@MitchTurner
Copy link
Member Author

@abdegenius Hey! I believe that @matt-user has already dug into this here. It looks like it's still blocked on some reviews.

@abdegenius
Copy link

Oh ok then, let me know if it is still a problem so i can jump on it.

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.

2 participants