[#176] shard: Make ID stringer to return base58 encoded string

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-18 14:52:26 +03:00 committed by Alex Vanin
parent 86385af67d
commit 9ab371aafb

View file

@ -1,5 +1,9 @@
package shard
import (
"github.com/mr-tron/base58"
)
// ID represents Shard identifier.
//
// Each shard should have the unique ID within
@ -12,7 +16,7 @@ func NewIDFromBytes(v []byte) *ID {
}
func (id ID) String() string {
return string(id)
return base58.Encode(id)
}
// ID returns Shard identifier.