diff --git a/lnd.go b/lnd.go index 12c4e1139..d8403d478 100644 --- a/lnd.go +++ b/lnd.go @@ -894,7 +894,10 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error // Set up an autopilot manager from the current config. This will be // used to manage the underlying autopilot agent, starting and stopping // it at will. - atplCfg, err := initAutoPilot(server, cfg.Autopilot, mainChain, cfg.ActiveNetParams) + atplCfg, err := initAutoPilot( + server, cfg.Autopilot, activeChainControl.MinHtlcIn, + cfg.ActiveNetParams, + ) if err != nil { err := fmt.Errorf("unable to initialize autopilot: %v", err) ltndLog.Error(err) diff --git a/pilot.go b/pilot.go index a9ac84777..55bd26670 100644 --- a/pilot.go +++ b/pilot.go @@ -137,7 +137,7 @@ var _ autopilot.ChannelController = (*chanController)(nil) // interfaces needed to drive it won't be launched before the Manager's // StartAgent method is called. func initAutoPilot(svr *server, cfg *lncfg.AutoPilot, - chainCfg *lncfg.Chain, netParams chainreg.BitcoinNetParams) ( + minHTLCIn lnwire.MilliSatoshi, netParams chainreg.BitcoinNetParams) ( *autopilot.ManagerCfg, error) { atplLog.Infof("Instantiating autopilot with active=%v, "+ @@ -177,7 +177,7 @@ func initAutoPilot(svr *server, cfg *lncfg.AutoPilot, private: cfg.Private, minConfs: cfg.MinConfs, confTarget: cfg.ConfTarget, - chanMinHtlcIn: chainCfg.MinHTLCIn, + chanMinHtlcIn: minHTLCIn, netParams: netParams, }, WalletBalance: func() (btcutil.Amount, error) {