lnd
lnd copied to clipboard
multi: optionally include AckedUpdates in ClientSession
In this commit, a range of functional options are added that can be used to fine-tune the extent to which the ClientSession
should be populated when read from the DB. This is useful in the cases where we want to read a ClientSession
from the db without needing the AckedUpdates
for example. This vastly improves the performance of all calls that dont require the AckedUpdates
. A few extra fields are also added to the ClientSession that represent a summary of the AckedUpdates
. These fields hold the info that is generally required from the AckedUpdates
and removes the need to read all the `AckedUpdates into memory.
Fixes https://github.com/lightningnetwork/lnd/issues/6660
Shout-out to @C-Otto for the PoC PR that got the momentum going 🙏