Is your feature request related to a problem? Please describe.
In high mempool fees times, it is painful to pay high fees to sweep your own outputs (stage 2 HTLC/FC outputs/etc). Sometimes as high as 100 sat/vb
This is because lnd uses 6 blocks target to sweep the outputs and that parameter is not configurable.
Work around to use high sweeper batch window (to club multiple outputs and potentially reduce fees) works but it suffers from its own limitations. See #7700
Describe the solution you'd like
lnd.conf can allow a max_sweep_fee_rate (default 69 sats/vb or a suitable value) which a node runner can configure to their desired setting. Setting this to 0 should revert back to 6 block target (used currently). If the estimated fees for 6 blocks is > max_sweep_fee_rate then the sweep should be sent with the max_sweep_fee_rate.
If node runner later on wants to speed up the sweep they can always use CPFP the sweep output.
Describe alternatives you've considered
Raising sweeper batch window to 1000 h or higher. But you need to restart lnd (with reduced batch window) to sweep and then again restart to increase batch window again. This is cumbersome and requires manual monitoring of mempool.
Additional context
This will help node runners optimise on on-chain costs.
Is your feature request related to a problem? Please describe.
In high mempool fees times, it is painful to pay high fees to sweep your own outputs (stage 2 HTLC/FC outputs/etc). Sometimes as high as 100 sat/vb
This is because lnd uses 6 blocks target to sweep the outputs and that parameter is not configurable.
Work around to use high sweeper batch window (to club multiple outputs and potentially reduce fees) works but it suffers from its own limitations. See #7700
Describe the solution you'd like
lnd.conf can allow a max_sweep_fee_rate (default 69 sats/vb or a suitable value) which a node runner can configure to their desired setting. Setting this to 0 should revert back to 6 block target (used currently). If the estimated fees for 6 blocks is > max_sweep_fee_rate then the sweep should be sent with the max_sweep_fee_rate.
If node runner later on wants to speed up the sweep they can always use CPFP the sweep output.
Describe alternatives you've considered
Raising sweeper batch window to 1000 h or higher. But you need to restart lnd (with reduced batch window) to sweep and then again restart to increase batch window again. This is cumbersome and requires manual monitoring of mempool.
Additional context
This will help node runners optimise on on-chain costs.