@cryptotaxi247 / kubo / commits / 32ef57c47

Return ErrNotFound when zero values are returned from DHT namesys resolve

License: MIT Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>

Dirk McCormick committed Mar 21, 2018 at 22:58 UTC 32ef57c476e8a9eceb853399e22d81a2e5d14146
1 file changed +4
namesys/routing.go
+4
@@ -202,6 +202,10 @@ func (r *routingResolver) getValue(ctx context.Context, ipnsKey string, options
202 }
203 }
204
205 + if len(recs) == 0 {
206 + return nil, routing.ErrNotFound
207 + }
208 +
209 i, err := IpnsSelectorFunc(ipnsKey, recs)
210 if err != nil {
211 return nil, err