peer: use EstimateFeePerVSize
This commit is contained in:
parent
d4cedc2917
commit
b9d1eceda3
4
peer.go
4
peer.go
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user