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

Properly handles possible nil values #6042

Merged
merged 1 commit into from
May 29, 2020
Merged

Conversation

farazdagi
Copy link
Contributor

What type of PR is this?

Other/Cleanup

What does this PR do? Why is it needed?

  • Properly handles issues with improper handling of nil values

Other notes for review

  • Issue was detected when reviewing the following code:

    prysm/validator/db/db.go

    Lines 69 to 71 in ac862d1

    kv, err := NewKVStore(dirPath)
    // Initialize the required public keys into the DB to ensure they're not empty.
    if err := kv.initializeSubBuckets(pubKeys); err != nil {

    Here we do not properly handle error and possible nil value returned for the kv object.
  • Couple of issues of the same origin have been identified in other places and fixed as well.

@farazdagi farazdagi added the Ready For Review A pull request ready for code review label May 29, 2020
@farazdagi farazdagi requested a review from nisdas May 29, 2020 11:49
@farazdagi farazdagi requested a review from a team as a code owner May 29, 2020 11:49
@farazdagi farazdagi self-assigned this May 29, 2020
Copy link
Member

@nisdas nisdas left a comment

Choose a reason for hiding this comment

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

nice catches

@prylabs-bulldozer prylabs-bulldozer bot merged commit 0eaf0cf into master May 29, 2020
@delete-merged-branch delete-merged-branch bot deleted the unhandled-nilness branch May 29, 2020 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants