-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor commitments and meta-commitments (#2579)
Move all the logic that was previously inside `Commitments` to `MetaCommitments`. The code changes are quite minimal, with a few subtleties: we need to update the local/remote commit indices separately of the commitments themselves, because they're not in the same data structure (yet). Some of these changes show where the current model doesn't work well: - `remotePerCommitmentPoint` is duplicated across all remote commits: it's not obvious, but it has to be the same value - htlcs should be shared between commitments - the coupling between `remoteNextCommitInfo` and `nextRemoteCommit_opt` is really weird to work with (especially in `receiveRevocation`): this can be fixed by slightly re-working the model The data model will be updated in future commits to fix these issues.
- Loading branch information
Showing
10 changed files
with
941 additions
and
980 deletions.
There are no files selected for viewing
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
861 changes: 22 additions & 839 deletions
861
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.