mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-05 20:49:48 +02:00
sweep: add new error ErrZeroFeeRateDelta
This commit is contained in:
parent
6c2e8b9a00
commit
5f64280df4
@ -14,6 +14,9 @@ var (
|
|||||||
// ErrMaxPosition is returned when trying to increase the position of
|
// ErrMaxPosition is returned when trying to increase the position of
|
||||||
// the fee function while it's already at its max.
|
// the fee function while it's already at its max.
|
||||||
ErrMaxPosition = errors.New("position already at max")
|
ErrMaxPosition = errors.New("position already at max")
|
||||||
|
|
||||||
|
// ErrZeroFeeRateDelta is returned when the fee rate delta is zero.
|
||||||
|
ErrZeroFeeRateDelta = errors.New("fee rate delta is zero")
|
||||||
)
|
)
|
||||||
|
|
||||||
// mSatPerKWeight represents a fee rate in msat/kw.
|
// mSatPerKWeight represents a fee rate in msat/kw.
|
||||||
@ -169,7 +172,7 @@ func NewLinearFeeFunction(maxFeeRate chainfee.SatPerKWeight,
|
|||||||
"endingFeeRate=%v, width=%v, delta=%v", start, end,
|
"endingFeeRate=%v, width=%v, delta=%v", start, end,
|
||||||
l.width, l.deltaFeeRate)
|
l.width, l.deltaFeeRate)
|
||||||
|
|
||||||
return nil, fmt.Errorf("fee rate delta is zero")
|
return nil, ErrZeroFeeRateDelta
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attach the calculated values to the fee function.
|
// Attach the calculated values to the fee function.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user