Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Daira Emma Hopwood <[email protected]>
  • Loading branch information
nuttycom and daira committed Oct 31, 2023
1 parent e9bb680 commit fce694b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions zcash_client_backend/proto/proposal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ message Proposal {
// The fee rule used in constructing this proposal
FeeRule feeRule = 6;
// The minimum number of confirmations required for transaction inputs to be selected.
// Each of the proposed inputs is know to have at least this many confirmations.
// Each of the proposed inputs must have at least this many confirmations.
uint32 minConfirmations = 7;
// The target height for which the proposal was constructed
//
Expand Down Expand Up @@ -71,8 +71,7 @@ enum FeeRule {
Zip317 = 3;
}

// The total value, fee amount, and change outputs of the proposed
// transaction
// The proposed change outputs and fee amount.
message TransactionBalance {
repeated ChangeValue proposedChange = 1;
uint64 feeRequired = 2;
Expand Down
3 changes: 3 additions & 0 deletions zcash_client_backend/src/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ impl ChangeValue {
pub struct TransactionBalance {
proposed_change: Vec<ChangeValue>,
fee_required: NonNegativeAmount,

// A cache for the sum of proposed change and fee; we compute it on construction anyway, so we
// cache the resulting value.
total: NonNegativeAmount,
}

Expand Down
5 changes: 2 additions & 3 deletions zcash_client_backend/src/proto/proposal.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fce694b

Please sign in to comment.