lnwallet: correct scaling for fee-per-byte to fee-per-weight, divide by 4

This commit corrects an error in the scaling as currently implemented
in the default static fee estimator. The spec draft has an error and
erroneously recommends multiplying by 4 to arrive at the fee-per-weight
from the fee-per-byte. This is incorrect as with the segwit block-size
increase, the ratio is 1/4 rather than 4.
This commit is contained in:
Olaoluwa Osuntokun 2017-05-16 19:01:57 -07:00
parent c324b11b95
commit 4ba01bb558
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -1467,7 +1467,7 @@ func (e StaticFeeEstimator) EstimateFeePerByte(numBlocks uint32) uint64 {
// EstimateFeePerWeight will return a static value for fee calculations.
func (e StaticFeeEstimator) EstimateFeePerWeight(numBlocks uint32) uint64 {
return e.FeeRate * 4
return e.FeeRate / 4
}
// EstimateConfirmation will return a static value representing the estimated