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

Additional protobuf nil checks #427

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

mooselumph
Copy link
Collaborator

Why are these changes needed?

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@mooselumph mooselumph requested review from jianoaix and ian-shim April 1, 2024 23:20
@@ -46,7 +46,7 @@ func GetBlobMessages(in *pb.StoreChunksRequest) ([]*core.BlobMessage, error) {

bundles := make(map[core.QuorumID]core.Bundle, len(blob.GetBundles()))
for j, chunks := range blob.GetBundles() {
quorumID := blob.GetHeader().GetQuorumHeaders()[j].QuorumId
quorumID := blob.GetHeader().GetQuorumHeaders()[j].GetQuorumId()
Copy link
Contributor

@ian-shim ian-shim Apr 2, 2024

Choose a reason for hiding this comment

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

Similarly, let's check blob.GetHeader().GetQuorumHeaders()[j] isn't nil

Comment on lines +81 to +82
ChunkLength: uint64(req.GetEncodingParams().GetChunkLength()),
NumChunks: uint64(req.GetEncodingParams().GetNumChunks()),
Copy link
Contributor

@ian-shim ian-shim Apr 2, 2024

Choose a reason for hiding this comment

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

I think you need nil check for req.GetEncodingParams() before calling Get...

@siddimore siddimore mentioned this pull request Apr 2, 2024
5 tasks
@mooselumph mooselumph merged commit 3d9fff2 into Layr-Labs:master Apr 2, 2024
6 checks passed
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.

2 participants