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.
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
Add support for transparent-source-only (TEX) addresses #1257
Add support for transparent-source-only (TEX) addresses #1257
Changes from 1 commit
2fae4bb
0f3de63
549fe0b
eb88461
c6520cf
2f521d7
0f49dae
637ae92
994f6ff
25f07da
e164b59
914acb5
745054b
6b465b7
4f43a01
5a90fff
7fb3557
7d8a96f
bd6c9f3
0735390
c926e7c
ffb2ddf
b778139
7a05b44
6471d4c
ec4a6d0
81a2846
f0e5aab
feabe6d
baccb43
9c082dc
3829663
25006ab
3922d71
d32b7db
286439a
bc38f2a
7838c04
14bdcde
8636daa
01ff201
b63ff5b
e97da43
a01588b
86428c4
b48f627
6bc22f4
27ca6e4
bda6451
22b8cff
9856a70
56aa348
aa43123
dbb5eeb
24b6d50
f8bedd8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 463 in zcash_client_backend/src/data_api/wallet/input_selection.rs
Codecov / codecov/patch
zcash_client_backend/src/data_api/wallet/input_selection.rs#L463
Check warning on line 491 in zcash_client_backend/src/data_api/wallet/input_selection.rs
Codecov / codecov/patch
zcash_client_backend/src/data_api/wallet/input_selection.rs#L490-L491
Check warning on line 601 in zcash_client_backend/src/data_api/wallet/input_selection.rs
Codecov / codecov/patch
zcash_client_backend/src/data_api/wallet/input_selection.rs#L601
Check warning on line 789 in zcash_client_backend/src/data_api/wallet/input_selection.rs
Codecov / codecov/patch
zcash_client_backend/src/data_api/wallet/input_selection.rs#L789
Check warning on line 794 in zcash_client_backend/src/data_api/wallet/input_selection.rs
Codecov / codecov/patch
zcash_client_backend/src/data_api/wallet/input_selection.rs#L794
Check warning on line 348 in zcash_client_backend/src/fees.rs
Codecov / codecov/patch
zcash_client_backend/src/fees.rs#L347-L348
Check warning on line 392 in zcash_client_backend/src/fees/common.rs
Codecov / codecov/patch
zcash_client_backend/src/fees/common.rs#L392
Check warning on line 408 in zcash_client_backend/src/fees/common.rs
Codecov / codecov/patch
zcash_client_backend/src/fees/common.rs#L408
Check warning on line 414 in zcash_client_backend/src/fees/common.rs
Codecov / codecov/patch
zcash_client_backend/src/fees/common.rs#L414
Check warning on line 468 in zcash_client_backend/src/fees/common.rs
Codecov / codecov/patch
zcash_client_backend/src/fees/common.rs#L468
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.
Could this be refactored into something that doesn't involve such code complexity, or at least extracted into a function that can be unit tested?
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.
It's not really possible to make it much less complex, I think. If we want to unit-test
allowed_dust
and/orhypothetical_actions
, we can easily pull them out into standalone functions then (note that they close over a few variables, which means you end up with some boilerplate argument passing by doing that). None of this is public API surface, so we don't need to do that in the absence of an actual test.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.
Ultimately what we probably want to do here is, instead of checking for dust inputs that exceed the allowed limit and returning an error, treat dust inputs separately and simply prune to what we can consume in unused input slots given the available logical actions. We know the minimum number of logical actions going in to input selection, so we can just take the largest dust values and spend them.
Check warning on line 605 in zcash_client_backend/src/fees/common.rs
Codecov / codecov/patch
zcash_client_backend/src/fees/common.rs#L600-L605
Check warning on line 607 in zcash_client_backend/src/fees/common.rs
Codecov / codecov/patch
zcash_client_backend/src/fees/common.rs#L607