Fix panic when asking for a salted hash of key with len != 32 #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[When upgrading substrate to latest [parity-db 2.0.0
](https://github.com/paritytech/substrate/pull/8015), we [saw a panic in the benchmarking](https://gitlab.parity.io/parity/substrate/-/jobs/801118#L2252) of code we haven't touched. A short investigation revealed that the [recently added key salting feature](https://github.com/paritytech/parity-db/commit/64389057d3db2a72f92e43259db1a0ad65c66632) doesn't properly deal with keys of length other than
32`. This PR fixes that behavior for both circumstances of the key being smaller then (our case) but also larger than 32 character.I wanted to add tests, but noticed there aren't any and that a general infrastructure for them is missing.. (e.g. easily create a testable
Column
)@arkpar may I ask you to release this as
2.0.1
soon, so I can merge the dependencies PR?!?