forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Temp #102
Closed
Closed
Temp #102
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this commit, a new key, cChanMaxCommitmentHeight, is added to the channel details bucket. This key will hold the highest commitment number that the tower has been handed for this channel. In this commit, we start writing to it in the two places where a backup is first persisted in the tower client db: 1) CommitUpdate and 2) in the Queue's `addItem` method. The logic for both 1 & 2 is tested in the next commit which adds a DB helper that allows us to read the new field. A follow up commit will do a migration to back-fill the new field.
This commit also adds tests for the DB changes made in the previous commit since we can now read the new field with the FetchChanInfos method. The commit following this one does the backfill migration.
Pull reviewers statsStats of the last 30 days for lnd:
|
This commit adds a test to demonstrate an edge case that can result in the "tower has un-acked updates" error being thrown when a user is attempting to remove a tower. This will be fixed in an upcoming commit.
In this commit, we adjust the PostEvaluateFilterFn to also take in a count representing the number of committed updates (ie, persisted un-acked updates) that the session has. We also add a new CountCommittedUpdates option so that the number of committed updates is not counted unnecessarily. These new options are not yet used.
In this commit, we use the newly added session listing options to ensure that we only see a session as exhausted if it does not have any un-acked updates on disk. This fixes the bug previously demonstrated.
This is added as a TLV record meaning that all the towers currently on disk that don't have this new field will be seen as Active.
And then only load active towers on client start up.
This new method sets the tower's status to inactive. It also iterates over all the tower's sessions and set's their status to inactive too. With this commit we also ensure that a tower's status is set to active if the CreateTower is called when the tower already exists.
Instead of loading towers by active sessions.
In this commit, the client session Inactive status is renamed to Terminal since its meaning will now change to mean that this session should never be used again. Follow up commits will ensure that we no longer move sessions to this state unless they can absolutely not be recovered.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
Description of change / link to associated issue.
Steps to Test
Steps for reviewers to follow to test the change.
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]
in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.