chore(store): check value (backport #17900) (#17907)

Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
mergify[bot]
2023-09-27 17:26:56 +02:00
committed by GitHub
co-authored by Marko
parent f4796c9a14
commit 13bd2264e3
+1
View File
@@ -38,6 +38,7 @@ func (dsa Store) Has(key []byte) bool {
// Set wraps the underlying DB's Set method panicing on error.
func (dsa Store) Set(key, value []byte) {
types.AssertValidKey(key)
types.AssertValidValue(value)
if err := dsa.DB.Set(key, value); err != nil {
panic(err)
}