lnwallet: calcStaticFee now directly uses feePerKw

This commit is contained in:
Olaoluwa Osuntokun 2017-05-16 18:56:39 -07:00
parent 52942e4f13
commit 222385bf73
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
2 changed files with 4 additions and 4 deletions

@ -337,9 +337,9 @@ func calcStaticFee(numHTLCs int) btcutil.Amount {
const (
commitWeight = btcutil.Amount(724)
htlcWeight = 172
feePerByte = btcutil.Amount(50 * 4)
feePerKw = btcutil.Amount(24/4) * 1000
)
return feePerByte * (commitWeight +
return feePerKw * (commitWeight +
btcutil.Amount(htlcWeight*numHTLCs)) / 1000
}

@ -109,9 +109,9 @@ func calcStaticFee(numHTLCs int) btcutil.Amount {
const (
commitWeight = btcutil.Amount(724)
htlcWeight = 172
feePerByte = btcutil.Amount(250 * 4)
feePerKw = btcutil.Amount(250/4) * 1000
)
return feePerByte * (commitWeight +
return feePerKw * (commitWeight +
btcutil.Amount(htlcWeight*numHTLCs)) / 1000
}