[#1693] util: Replace conditional panics with asserts
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m29s
Build / Build Components (push) Successful in 2m11s
Pre-commit hooks / Pre-commit (push) Successful in 2m22s
Tests and linters / gopls check (push) Successful in 4m9s
Tests and linters / Run gofumpt (push) Successful in 4m26s
Tests and linters / Staticcheck (push) Successful in 5m1s
Tests and linters / Lint (push) Successful in 5m10s
Tests and linters / Tests (push) Successful in 5m23s
Tests and linters / Tests with -race (push) Successful in 5m56s
OCI image / Build container images (push) Successful in 4m12s

Change-Id: I13b566cde3e6d43d8a75aa2e9b28e63b597adff9
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
Ekaterina Lebedeva 2025-04-08 16:55:56 +03:00
parent 5dd8d7e87a
commit e45382b0c1

View file

@ -6,6 +6,7 @@ import (
"os"
"text/tabwriter"
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/assert"
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neo-go/pkg/crypto/hash"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
@ -104,9 +105,7 @@ func (d Dashboard) PrettyPrint(uncompressed, useHex bool) {
func base58ToHex(data string) string {
val, err := base58.Decode(data)
if err != nil {
panic("produced incorrect base58 value")
}
assert.NoError(err, "produced incorrect base58 value")
return hex.EncodeToString(val)
}