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

Add Option values to Explorer histogram data #705

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

Ayiga
Copy link
Member

@Ayiga Ayiga commented Sep 25, 2024

Closes #703

This PR:

Updates the ExplorerHistogram fields for both time and size to have Option values, which can result in a null value coming down to the client.

The data in the Explorer histogram can occasionally have a missing component.  There
are times when we have written Block Header information without having written the
Block Payload. Due to this, it allows for the possibility of being able to query
data for a Block that has the Header, but no paylaod.  This will ultimately result
in an error as the size of the block in question can not be determined.  This will
currently result in an error.

The change is to allow for nullable values for things like block size.  It should not
happen with block time, but since block time is also a Option result, it doesn't hurt
to also allow for it's value to be an Option as well.
@Ayiga Ayiga marked this pull request as ready for review September 25, 2024 13:45
@Ayiga Ayiga merged commit 3c873ec into main Sep 26, 2024
8 checks passed
@Ayiga Ayiga deleted the ts/enh/make-explorer-histogram-data-optional branch September 26, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for nullability in retrieved histogram data
3 participants