1
0
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:
Juan Batiz-Benet
2015-01-05 04:48:50 -08:00
parent 9d0736bc3b
commit 032b35b2ac

@ -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]]