fix: EncryptedCID FromBytes needs to be prefixed with class name

This commit is contained in:
Derrick Hammer 2024-01-03 15:28:05 -05:00
parent 6d943b3b2e
commit 989cb82a01
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -37,10 +37,10 @@ func DecodeEncryptedCID(cid string) (*EncryptedCID, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return FromBytes(data) return EncryptedCIDFromBytes(data)
} }
func FromBytes(data []byte) (*EncryptedCID, error) { func EncryptedCIDFromBytes(data []byte) (*EncryptedCID, error) {
if types.CIDType(data[0]) != types.CIDTypeEncryptedStatic { if types.CIDType(data[0]) != types.CIDTypeEncryptedStatic {
return nil, errors.New("Invalid CID type") return nil, errors.New("Invalid CID type")
} }