-
Notifications
You must be signed in to change notification settings - Fork 124
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
[wallet 2/3]: refactor funding logic to use allocation code #1407
Open
guggero
wants to merge
14
commits into
main
Choose a base branch
from
allocation-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Pull Request Test Coverage Report for Build 13571552842Details
💛 - Coveralls |
08b7805
to
941d26e
Compare
941d26e
to
06ea429
Compare
8c3d631
to
c28aacf
Compare
06ea429
to
8939b42
Compare
c28aacf
to
f2b9b0f
Compare
8939b42
to
ee66eb9
Compare
We'll generalize the allocation code in future commits so we can re-use it. We need to make sure we don't create circular package dependencies, so we move the code to a more appropriate location.
The version of the virtual packet has an influence on the commitment versions of the outputs created from it, so it's important that it can be configured in a more generic use of the allocation code.
This is a preparatory commit that just re-structures the vOutput creation a bit. This will make the actual changes in the next commit more easy to understand. This commit changes nothing in the behavior of the code.
The allocation code was previously only used for channel outputs, where all virtual transactions are always interactive. But we want to use the same code for non-interactive transfers as well, which requires a couple of tweaks.
Because we'll need to convert a funding template that's potentially given to us over the RPC interface into an allocation, we need to add custom code for that.
With the new funding logic now potentially adding the change output first, we need to make sure the channel funding logic doesn't use hard-coded indexes.
We are now validating the input amount and types when creating the allocations and no longer need this function.
ee66eb9
to
86112a5
Compare
f2b9b0f
to
d416a6f
Compare
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.
Refactors the wallet's funding code to use the pre-existing allocation logic to distribute coins from grouped assets.
Part of the group key support saga: