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

feat: add BlockProvider::ommers #1509

Merged
merged 2 commits into from
Feb 22, 2023
Merged

feat: add BlockProvider::ommers #1509

merged 2 commits into from
Feb 22, 2023

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Feb 22, 2023

add a new provider function to fetch ommers headers of a block (required by rpc)

@mattsse mattsse requested a review from rkrasiuk February 22, 2023 14:07
@mattsse mattsse added C-enhancement New feature or request A-rpc Related to the RPC implementation labels Feb 22, 2023
Comment on lines +142 to +143
let ommers =
tx.get::<tables::BlockOmmers>(number)?.map(|o| o.ommers).unwrap_or_default();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment for future ref: this can be optimized to return empty Vec post-merge

@mattsse mattsse merged commit 8094ab1 into main Feb 22, 2023
@mattsse mattsse deleted the matt/add-ommers-getter branch February 22, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants