routing: create PathFindingConfig for global parameters

This commit is contained in:
Joost Jager
2019-06-20 12:03:45 +02:00
parent 377b7bf3ce
commit 34b264a3d8
9 changed files with 83 additions and 56 deletions

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