-
Notifications
You must be signed in to change notification settings - Fork 137
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
libs/db: disallow empty keys #2
Comments
Found this commit 4ce8448d7fcf92b040046f894474ce2f7e779b67, but it does not explain why nil keys are OK. |
The SDK does not use empty keys. will see others then we can look at moving forward with this. |
I'm making some breaking changes to the interface shortly, suggest we do this at the same time since there are a few issues with empty keys (notably BoltDB not supporting it, and cLevelDB panics). Any objections? |
Modify batch `Set`, `Delete`, and `Close` to return errors. The main error condition currently is using closed batches, but future ones include databases which implement batches as transactions (e.g. BadgerDB) and rejecting empty keys (#2).
changelog Signed-off-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
…endermint#2) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.2.0 to 3.3.1. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v3.2.0...v3.3.1) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
See tendermint/tendermint#3610 (comment)
Reasons to do that:
default
or something else)The text was updated successfully, but these errors were encountered: