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

chore: update exposed db object IndexedBlock in x/finality module #209

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

samricotta
Copy link
Contributor

Part closes: https://github.com/babylonlabs-io/pm/issues/72

Currently some of the objects in the babylon apis are exposed and need to be handled correctly seen in https://github.com/babylonlabs-io/pm/issues/72

This PR handles the exposed objects in x/finality

Specifically the IndexedBlock object.

@samricotta samricotta requested a review from a team as a code owner October 17, 2024 11:22
@samricotta samricotta requested review from gitferry and KonradStaniec and removed request for a team October 17, 2024 11:22
@samricotta samricotta changed the title chore: update exposed db object IndexedBlock in x/finality module chore: update exposed db object IndexedBlock in x/finality module Oct 17, 2024
@@ -146,11 +146,22 @@ message QueryBlockRequest {
uint64 height = 1;
}

// BlockResponse is the necessary metadata and finalization status of a block
message BlockResponse {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I would name it IndexedBlockResponse to make it clear that the response contains indexed blocks

Copy link
Member

@Lazar955 Lazar955 left a comment

Choose a reason for hiding this comment

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

lgtm, nits:

}

func convertToIndexedBlockList(brs []*ftypes.IndexedBlockResponse) []*ftypes.IndexedBlock {
var ibs []*ftypes.IndexedBlock
Copy link
Member

Choose a reason for hiding this comment

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

allocate the size in advance

}

func convertToIndexedBlockResponseList(ibs []*types.IndexedBlock) []*types.IndexedBlockResponse {
var blockResponses []*types.IndexedBlockResponse
Copy link
Member

Choose a reason for hiding this comment

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

same here

@gitferry
Copy link
Member

what's the status of this pr? @samricotta

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.

4 participants