Apply suggestions from code review

Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
This commit is contained in:
Kris Nuttycombe 2023-10-26 14:55:19 -06:00 committed by Kris Nuttycombe
parent f1c08693a5
commit 570ea48588
5 changed files with 12 additions and 9 deletions

View File

@ -381,8 +381,8 @@ where
/// Returns the proposal, which may then be executed using [`create_proposed_transaction`]
///
/// Parameters:
/// * `wallet_db`: A read/write reference to the wallet database
/// * `params`: Consensus parameters
/// * `wallet_db`: A read/write reference to the wallet database.
/// * `params`: Consensus parameters.
/// * `fee_rule`: The fee rule to use in creating the transaction.
/// * `spend_from_account`: The unified account that controls the funds that will be spent
/// in the resulting transaction. This procedure will return an error if the

View File

@ -17,7 +17,7 @@ use zcash_primitives::{
use super::{fixed, zip317, ChangeError, ChangeStrategy, DustOutputPolicy, TransactionBalance};
/// A change strategy that and proposes change as a single output to the most current supported
/// A change strategy that proposes change as a single output to the most current supported
/// shielded pool and delegates fee calculation to the provided fee rule.
pub struct SingleOutputChangeStrategy {
fee_rule: StandardFeeRule,

View File

@ -549,7 +549,7 @@ impl<Cache> TestState<Cache> {
>,
> {
let params = self.network();
let result = propose_standard_transfer_to_address::<_, _, CommitmentTreeErrT>(
propose_standard_transfer_to_address::<_, _, CommitmentTreeErrT>(
&mut self.db_data,
&params,
fee_rule,
@ -559,9 +559,7 @@ impl<Cache> TestState<Cache> {
amount,
memo,
change_memo,
);
result
)
}
/// Invokes [`propose_shielding`] with the given arguments.

View File

@ -80,6 +80,7 @@ and this library adheres to Rust's notion of
### Added
- `transaction::fees::StandardFeeRule`
## [0.13.0] - 2023-09-25
### Added
- `zcash_primitives::consensus::BlockHeight::saturating_sub`

View File

@ -60,9 +60,13 @@ pub trait FutureFeeRule: FeeRule {
/// An enumeration of the standard fee rules supported by the wallet.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum StandardFeeRule {
#[deprecated(note = "It is recommended to use `StandardFeeRule::Zip317` instead.")]
#[deprecated(
note = "Using this fee rule violates ZIP 317, and might cause transactions built with it to fail. Use `StandardFeeRule::Zip317` instead."
)]
PreZip313,
#[deprecated(note = "It is recommended to use `StandardFeeRule::Zip317` instead.")]
#[deprecated(
note = "Using this fee rule violates ZIP 317, and might cause transactions built with it to fail. Use `StandardFeeRule::Zip317` instead."
)]
Zip313,
Zip317,
}