fix: use record type, not hash type

This commit is contained in:
Derrick Hammer 2024-03-03 12:12:45 -05:00
parent c6aa2cf4a2
commit 4004dd98c9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ func (r *RegistryServiceDefault) Set(sre protocol.SignedRegistryEntry, trusted b
if len(sre.PK()) != 33 {
return errors.New("Invalid pubkey")
}
if int(sre.PK()[0]) != int(types.HashTypeEd25519) {
if int(sre.PK()[0]) != int(types.RecordTypeRegistryEntry) {
return errors.New("Only ed25519 keys are supported")
}
if sre.Revision() < 0 || sre.Revision() > 281474976710656 {