mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 06:35:07 +01:00
lnwallet: calcStaticFee now directly uses feePerKw
This commit is contained in:
parent
52942e4f13
commit
222385bf73
2 changed files with 4 additions and 4 deletions
|
@ -337,9 +337,9 @@ func calcStaticFee(numHTLCs int) btcutil.Amount {
|
||||||
const (
|
const (
|
||||||
commitWeight = btcutil.Amount(724)
|
commitWeight = btcutil.Amount(724)
|
||||||
htlcWeight = 172
|
htlcWeight = 172
|
||||||
feePerByte = btcutil.Amount(50 * 4)
|
feePerKw = btcutil.Amount(24/4) * 1000
|
||||||
)
|
)
|
||||||
return feePerByte * (commitWeight +
|
return feePerKw * (commitWeight +
|
||||||
btcutil.Amount(htlcWeight*numHTLCs)) / 1000
|
btcutil.Amount(htlcWeight*numHTLCs)) / 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,9 +109,9 @@ func calcStaticFee(numHTLCs int) btcutil.Amount {
|
||||||
const (
|
const (
|
||||||
commitWeight = btcutil.Amount(724)
|
commitWeight = btcutil.Amount(724)
|
||||||
htlcWeight = 172
|
htlcWeight = 172
|
||||||
feePerByte = btcutil.Amount(250 * 4)
|
feePerKw = btcutil.Amount(250/4) * 1000
|
||||||
)
|
)
|
||||||
return feePerByte * (commitWeight +
|
return feePerKw * (commitWeight +
|
||||||
btcutil.Amount(htlcWeight*numHTLCs)) / 1000
|
btcutil.Amount(htlcWeight*numHTLCs)) / 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue