mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-01 06:05:42 +08:00
dht: key without record validator func
This is causing test failures because tests don't usually have "/-/-" format. we can decide whether or not to allow keys without validators, but for now removing. cc @whyrusleeping
This commit is contained in:
@ -191,8 +191,8 @@ func (dht *IpfsDHT) verifyRecord(r *pb.Record, pk ci.PubKey) error {
|
||||
// Now, check validity func
|
||||
parts := strings.Split(r.GetKey(), "/")
|
||||
if len(parts) < 3 {
|
||||
log.Errorf("Record had bad key: %s", u.Key(r.GetKey()))
|
||||
return ErrBadRecord
|
||||
log.Infof("Record key does not have validator: %s", u.Key(r.GetKey()))
|
||||
return nil
|
||||
}
|
||||
|
||||
fnc, ok := dht.Validators[parts[1]]
|
||||
|
Reference in New Issue
Block a user