Commit Graph

8 Commits

Author SHA1 Message Date
yyforyongyu
5f64280df4 sweep: add new error ErrZeroFeeRateDelta 2024-12-20 17:53:59 +08:00
Keagan McClelland
ed2989ae33 multi: update to fn v2 2024-12-04 13:19:00 -07:00
yyforyongyu
ac5af48319 sweep: make sure the budget is used up at deadlineHeight-1 2024-05-18 07:45:09 +08:00
yyforyongyu
b6a2984167 sweep: allow specifying starting fee rate for fee func 2024-04-19 21:33:37 +08:00
yyforyongyu
4134b1c00a sweep: make sure max fee rate can be reached
Previously we don't allow confTarget to be 0, which ended up the final
position being never reached. We fix it here by allowing confTarget to
be 0 in case the deadline has already been passed for a given input.
2024-04-19 21:33:35 +08:00
yyforyongyu
0fc5301d12 lnwallet+sweep: cap conf target used in fee estimator 2024-04-19 21:33:31 +08:00
yyforyongyu
7fb18bc0d5 sweep: increase delta fee rate precision in fee function
This commit adds a private type `mSatPerKWeight` that expresses a given
fee rate in millisatoshi per kw. This is needed to increase the
precision of the fee function. When sweeping anchor inputs, if using a
deadline delta of over 1000, it's likely the delta will be 0 sat/kw due
to precision.
2024-04-19 21:33:29 +08:00
yyforyongyu
cd5d074099 sweep: add FeeFunction interface and a linear implementation
This commit adds a new interface, `FeeFunction`, to deal with
calculating fee rates. In addition, a simple linear function is
implemented, hence `LinearFeeFunction`, which will be used to calculate
fee rates when bumping fees. Check #4215 for other type of fee functions
that can be implemented.
2024-04-19 21:33:28 +08:00