提交 032b35b2 作者: Juan Batiz-Benet

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
上级 9d0736bc
......@@ -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]]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论