[#253] metabase: Add prefix to Graveyard and ToMoveIt bucket names

In previous implementation DB.Containers method could return an error about
invalid container ID string format. This could happen if some of top-level
buckets had name w/o "_" substring.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-17 11:07:51 +03:00 committed by Alex Vanin
parent df3d30d1ec
commit edef9463d7
3 changed files with 47 additions and 12 deletions

View file

@ -39,7 +39,7 @@ func (db *DB) containers(tx *bbolt.Tx) ([]*container.ID, error) {
func parseContainerID(name []byte) (*container.ID, error) {
strName := string(name)
if strings.Contains(strName, "_") {
if strings.Contains(strName, invalidBase58String) {
return nil, nil
}