Make ChangeStrategy values usable outside of the context of zcash_client_backend#2094
Merged
Merged
Conversation
This trait is introduced in order to make it possible to implement `ChangeStrategy` for a type where the `fetch_wallet_meta` method provably ignores its `meta_source` argument. This is useful for circumstances when no input source is available.
bf05408 to
3c96bd2
Compare
str4d
requested changes
Dec 19, 2025
In order to use zcash_client_backend::fees::ChangeStrategy when preparing a spend of transparent coins, it is necessary to be able to accurately compute fees. At present, the fee computation logic in `zcash_client_backend` only functions in the context of spending p2pkh inputs. Instead of reimplementing script size computation externally, this commit exposes enough information from the `zcash_transparent` builder to enable the script size computation used by the builder to also be used externally.
3c96bd2 to
2303fa4
Compare
Collaborator
Author
|
force-pushed and commit added to address comments from code review. |
str4d
previously approved these changes
Dec 19, 2025
Co-authored-by: Jack Grigg <jack@electriccoin.co>
str4d
approved these changes
Dec 19, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2094 +/- ##
==========================================
- Coverage 73.84% 73.83% -0.02%
==========================================
Files 222 222
Lines 36704 36716 +12
==========================================
+ Hits 27103 27108 +5
- Misses 9601 9608 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This exposes types and trait implementations from
zcash_transparentandzcash_client_backendto make it easier to use theChangeStrategytype in contexts outside ofzcash_client_backendproposal construction.