lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.56k stars 2.06k forks source link

[feature]: sweep: batch inputs with similar deadlines #8818

Open morehouse opened 1 month ago

morehouse commented 1 month ago

Currently the sweeper will only batch inputs that have the exact same deadline. This is reasonable for shorter deadlines, where a single block difference in deadline calls for significantly different fees.

But for no-deadline sweeps, an artificial deadline of 1008 blocks is used, which causes later no-deadline sweeps to have a different deadline and be batched separately. As discussed in https://github.com/lightningnetwork/lnd/pull/8751#discussion_r1605540030, we could save on fees if all no-deadline sweeps could be batched together.

warioishere commented 1 month ago

I would also appreciate that, Why sweeper batch window duration can be kept example just for non time sensitive sweeps? I loved this option to use for non time sensitive sweeps.