Consolidate fee_amount and amount_needed#662
Merged
afilini merged 1 commit intobitcoindevkit:masterfrom Aug 3, 2022
Merged
Conversation
Member
danielabrozzoni
left a comment
There was a problem hiding this comment.
Concept ACK, a small comment :)
Member
|
Concept ACK for me. This PR is rather straight forward, and for the context on my work with multi-descriptor support (#486), it would be good to merge this PR soon (since I will also be modifying the Other than the concerns mentioned in #662 (comment), I think this PR is good to merge. |
22 tasks
641718b to
84317d4
Compare
Member
|
Please rebase to fix the conflicts, then I'll ACK :) |
40126f5 to
6493bbf
Compare
Member
|
Code review ACK 6493bbf |
01d195a to
0f83d47
Compare
Contributor
Author
|
Rebased with master.
|
20 tasks
e9b51ef to
6eb299b
Compare
Before this commit `fee_amount` and `amount_needed` were passed as independent parameters. From the perspective of coin selection algorithms, they are always used jointly for the same purpose, to create a coin selection with a total effective value greater than it's summed values. This commit removes the abstraction that the use of the two parameter introduced by consolidating both into a single parameter, `target_amount`, who carries their values added up.
6eb299b to
e8df3d2
Compare
Member
|
I rebased by myself, now it's ready for merge re-ACK e8df3d2 - I tested with the fuzzer, run it for 13,000,000 iterations, couldn't find any crash :) |
This file contains hidden or 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
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.
Description
Before this commit
fee_amountandamount_neededwere passed as independentparameters. From the perspective of coin selection algorithms, they are always
used jointly for the same purpose, to create a coin selection with a total
effective value greater than it's summed values.
This commit removes the abstraction that the use of the two parameter
introduced by consolidating both into a single parameter,
target_amount, whocarries their values added up.
Resolves: #641
Notes to the reviewers
I just updated old tests and didn't create new ones because almost all changes
are renames and "logic changes" (like the addition of the selection fee) are
tested in the modified tests.
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.mdBugfixes: