[WIP] wtclient: replay pending and unacked updates
This PR demonstrates 3 main issues and fixes 2 of them at the moment:
- If
backupTaskshave been "bound" to a session'spendingQueueand then the associated Tower is removed, those pending updates are just quietly lost at the moment. This PR makes sure that these tasks are "unbound" and replayed onto the main task pipeline. - If a
CommittedUpdatehas been persisted but the session does not respond with an Ack and then the client requests to remove the tower, this will currently fail with "tower has unacked updates". However, since these updates are still on the session's pending queue, they can still be recovered and replayed onto the main task pipeline as long as LND is not restarted since then the task is lost from the pending queue. - As a follow up from 2, we demonstrate that if LND is restarted between the CommittedUpdate being persisted and the client requesting that the tower be removed, then this will fail with "tower has unacked updates". This PR does not fix this issue (yet) as im trying to determine if we can actually recover the info we need to to be able to reconstruct the
backupTask
Fixes https://github.com/lightningnetwork/lnd/issues/4420
@Bladez1753 , accidental comment?
@ellemouton, remember to re-request review from reviewers when ready
note to myself to checkout this failure: https://github.com/lightningnetwork/lnd/actions/runs/5011209617/jobs/8981798576?pr=6895
Concept Ack
@ellemouton, remember to re-request review from reviewers when ready
We got the approvals. Retagged it for 0.17.0