discovery: use errors.Is for error check
Ensure that the check works for wrapped errors. Otherwise, this breaks for a SQLStore graph backend which wraps the error it returns.
This commit is contained in:
1 file changed
+1
-1
@@ -236,7 +236,7 @@ func (c *ChannelGraphBootstrapper) SampleNodeAddrs(_ context.Context,
|
|||||||
|
|
||||||
return errFound
|
return errFound
|
||||||
})
|
})
|
||||||
if err != nil && err != errFound {
|
if err != nil && !errors.Is(err, errFound) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user