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

fix(pkg/dabase): return error when attempting to access deleted database #2025

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

ostafen
Copy link
Collaborator

@ostafen ostafen commented Sep 16, 2024

No description provided.

Signed-off-by: Stefano Scafiti <stefano.scafiti96@gmail.com>
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 89.286% (+0.005%) from 89.281%
when pulling 0f6296b on ostafen:fix/deleted-databases
into d47d3ef on codenotary:master.


return idx >= 0 && idx < len(m.databases)
return !db.deleted
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't be here also check for idx?

Copy link
Collaborator Author

@ostafen ostafen Sep 16, 2024

Choose a reason for hiding this comment

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

Alredy done by call to function db, exists := m.getDB(idx). It returns false if idx is not inside the range

@ostafen ostafen merged commit dff412a into codenotary:master Sep 16, 2024
17 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.

3 participants