-
Notifications
You must be signed in to change notification settings - Fork 307
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
Consolidate fee_amount
and amount_needed
#662
Consolidate fee_amount
and amount_needed
#662
Conversation
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.
Concept ACK, a small comment :)
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. |
641718b
to
84317d4
Compare
Please rebase to fix the conflicts, then I'll ACK :) |
40126f5
to
6493bbf
Compare
Code review ACK 6493bbf |
01d195a
to
0f83d47
Compare
Rebased with master.
|
e9b51ef
to
6eb299b
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.
tACK 6eb299b
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
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 :) |
Description
Before this commit
fee_amount
andamount_needed
were 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 fmt
andcargo clippy
before committingNew Features:
CHANGELOG.md
Bugfixes: