routing: add todo describing route cache bug

This commit is contained in:
Joost Jager 2019-03-05 22:15:34 +01:00
parent 6e10c05a82
commit 6cc82b4a34
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

View File

@ -1338,9 +1338,13 @@ func (r *ChannelRouter) FindRoutes(source, target Vertex,
log.Debugf("Searching for path to %x, sending %v", target, amt)
// Before attempting to perform a series of graph traversals to find
// the k-shortest paths to the destination, we'll first consult our
// path cache
// Before attempting to perform a series of graph traversals to find the
// k-shortest paths to the destination, we'll first consult our path
// cache
//
// TODO: Route cache should store all request parameters instead of just
// amt and target. Currently false positives are returned if just the
// restrictions (fee limit, ignore lists) or finalExpiry are different.
rt := newRouteTuple(amt, target[:])
r.routeCacheMtx.RLock()
routes, ok := r.routeCache[rt]