fuel-core icon indicating copy to clipboard operation
fuel-core copied to clipboard

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

Open MitchTurner opened this issue 1 year ago • 3 comments

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,
}

MitchTurner avatar Jul 02 '24 22:07 MitchTurner

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

abdegenius avatar Oct 24 '24 13:10 abdegenius

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

MitchTurner avatar Oct 25 '24 11:10 MitchTurner

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

abdegenius avatar Oct 26 '24 11:10 abdegenius