-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chanbackup: update on-disk backup file with unconfirmed channels #3993
chanbackup: update on-disk backup file with unconfirmed channels #3993
Conversation
5afa2c0
to
acc3e51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solid pr, no issues with the existing code. my only other question is are these pending channels ever cleaned up if the channels never confirm? it seems like they could continue to inflate the size of our channel.backup
indefinitely unless they are later pruned, no?
To be able to write a new channel backup file for pending channels, we need to include the channel configuration in the pending channel notification event.
e96ff24
to
e07dd46
Compare
Good question. What happens with them in the channel DB? Are they detected and removed after a certain time? Or would you need to call |
e07dd46
to
bd62301
Compare
Yes, currently they will stay around (only if you're the initiator) until |
bd62301
to
4794045
Compare
To fix the discrepancy between getting the channel backups via RPC where all pending channels are included, we also update the channel.backup file on disk whenever we get a pending channel event notification.
The synchronous call to get all channel backups also include channels that are pending at the moment of the call. A previous commit added pending channels to the file based backup as well. So this is the last backup method that needs to be adjusted to also contain unconfirmed channels.
4794045
to
ab024b9
Compare
I added a commit to remove the channel from the backup file if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🌊
Fixes #3816.
Currently there is a discrepancy between the backups obtained through the gRPC call and the content of the automatically created
channel.backup
file. The RPC backups do contain pending channels while the backup file does not.This PR aims to fix that discrepancy.