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
Juan Batiz-Benet committed
Jan 5, 2015 at 04:48 UTC
032b35b2ac070663736de52e5c1f0fe1ecba6efc
1 file changed
+2
-2
routing/dht/records.go
+2
-2
@@ -191,8 +191,8 @@ func (dht *IpfsDHT) verifyRecord(r *pb.Record, pk ci.PubKey) error {
191
// Now, check validity func
192
parts := strings.Split(r.GetKey(), "/")
193
if len(parts) < 3 {
194
- log.Errorf("Record had bad key: %s", u.Key(r.GetKey()))
195
- return ErrBadRecord
194
+ log.Infof("Record key does not have validator: %s", u.Key(r.GetKey()))
195
+ return nil
196
}
197
198
fnc, ok := dht.Validators[parts[1]]