This commit is contained in:
mcrakhman 2023-04-21 23:25:54 +02:00 committed by Mikhail Iudin
parent 5709bc99e3
commit e34d298b8e
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0

View File

@ -213,7 +213,7 @@ func validateSpaceStorageCreatePayload(payload spacestorage.SpaceStorageCreatePa
func ValidateSpaceHeader(rawHeaderWithId *spacesyncproto.RawSpaceHeaderWithId, identity crypto.PubKey) (err error) {
sepIdx := strings.Index(rawHeaderWithId.Id, ".")
if sepIdx == -1 {
err = objecttree.ErrIncorrectCid
err = spacestorage.ErrIncorrectSpaceHeader
return
}
if !cidutil.VerifyCid(rawHeaderWithId.RawHeader, rawHeaderWithId.Id[:sepIdx]) {