peer: use EstimateFeePerVSize

This commit is contained in:
Johan T. Halseth 2018-02-13 15:07:20 +01:00
parent d4cedc2917
commit b9d1eceda3
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26
1 changed files with 2 additions and 2 deletions

View File

@ -1415,7 +1415,7 @@ func (p *peer) fetchActiveChanCloser(chanID lnwire.ChannelID) (*channelCloser, e
// In order to begin fee negotiations, we'll first compute our
// target ideal fee-per-kw. We'll set this to a lax value, as
// we weren't the ones that initiated the channel closure.
satPerWight, err := p.server.cc.feeEstimator.EstimateFeePerWeight(6)
feePerVSize, err := p.server.cc.feeEstimator.EstimateFeePerVSize(6)
if err != nil {
return nil, fmt.Errorf("unable to query fee "+
"estimator: %v", err)
@ -1424,7 +1424,7 @@ func (p *peer) fetchActiveChanCloser(chanID lnwire.ChannelID) (*channelCloser, e
// We'll then convert the sat per weight to sat per k/w as this
// is the native unit used within the protocol when dealing
// with fees.
targetFeePerKw := satPerWight * 1000
targetFeePerKw := feePerVSize.FeePerKWeight()
_, startingHeight, err := p.server.cc.chainIO.GetBestBlock()
if err != nil {