routing: create PathFindingConfig for global parameters

This commit is contained in:
Joost Jager committed 2019-07-18 15:49:25 +02:00
1 parent 377b7bf3ce
commit 34b264a3d8
9 files changed
+83 -56

No files matched your search

+5 -1
View File
@@ -287,6 +287,9 @@ type Config struct {
// spentness of channel outpoints. For neutrino, this saves long rescans
// from blocking initial usage of the daemon.
AssumeChannelValid bool
// PathFindingConfig defines global path finding parameters.
PathFindingConfig PathFindingConfig
}
// routeTuple is an entry within the ChannelRouter's route cache. We cache
@@ -1455,7 +1458,8 @@ func (r *ChannelRouter) FindRoute(source, target route.Vertex,
graph: r.cfg.Graph,
bandwidthHints: bandwidthHints,
},
restrictions, source, target, amt,
restrictions, &r.cfg.PathFindingConfig,
source, target, amt,
)
if err != nil {
return nil, err