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:
parent
c324b11b95
commit
4ba01bb558
@ -1467,7 +1467,7 @@ func (e StaticFeeEstimator) EstimateFeePerByte(numBlocks uint32) uint64 {
|
|||||||
|
|
||||||
// EstimateFeePerWeight will return a static value for fee calculations.
|
// EstimateFeePerWeight will return a static value for fee calculations.
|
||||||
func (e StaticFeeEstimator) EstimateFeePerWeight(numBlocks uint32) uint64 {
|
func (e StaticFeeEstimator) EstimateFeePerWeight(numBlocks uint32) uint64 {
|
||||||
return e.FeeRate * 4
|
return e.FeeRate / 4
|
||||||
}
|
}
|
||||||
|
|
||||||
// EstimateConfirmation will return a static value representing the estimated
|
// EstimateConfirmation will return a static value representing the estimated
|
||||||
|
Loading…
Reference in New Issue
Block a user