mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
lnd+pilot+autopilot: use config to set active autopilot heuristics
This commit is contained in:
12
pilot.go
12
pilot.go
@@ -148,15 +148,13 @@ func initAutoPilot(svr *server, cfg *autoPilotConfig) (*autopilot.ManagerCfg, er
|
||||
10,
|
||||
cfg.Allocation,
|
||||
)
|
||||
|
||||
// First, we'll create the preferential attachment heuristic.
|
||||
prefAttachment := autopilot.NewPrefAttachment()
|
||||
heuristics, err := validateAtplCfg(cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
weightedAttachment, err := autopilot.NewWeightedCombAttachment(
|
||||
&autopilot.WeightedHeuristic{
|
||||
Weight: 1.0,
|
||||
AttachmentHeuristic: prefAttachment,
|
||||
},
|
||||
heuristics...,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user