autopilot: extract default fee estimate target conf into constant

This commit is contained in:
Johan T. Halseth 2019-04-26 15:32:29 +02:00
parent 52b7603d25
commit 9a7f24d2d3
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26
2 changed files with 8 additions and 1 deletions

View File

@ -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.

View File

@ -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
}