diff --git a/autopilot/interface.go b/autopilot/interface.go index 1886929a..34ef7597 100644 --- a/autopilot/interface.go +++ b/autopilot/interface.go @@ -9,6 +9,11 @@ import ( "github.com/lightningnetwork/lnd/lnwire" ) +// DefaultConfTarget is the default confirmation target for autopilot channels. +// TODO(halseth): possibly make dynamic, going aggressive->lax as more channels +// are opened. +const DefaultConfTarget = 3 + // Node node is an interface which represents n abstract vertex within the // channel graph. All nodes should have at least a single edge to/from them // within the graph. diff --git a/pilot.go b/pilot.go index b8f3831a..ad8eeab7 100644 --- a/pilot.go +++ b/pilot.go @@ -84,7 +84,9 @@ func (c *chanController) OpenChannel(target *btcec.PublicKey, // With the connection established, we'll now establish our connection // to the target peer, waiting for the first update before we exit. - feePerKw, err := c.server.cc.feeEstimator.EstimateFeePerKW(3) + feePerKw, err := c.server.cc.feeEstimator.EstimateFeePerKW( + autopilot.DefaultConfTarget, + ) if err != nil { return err }