diff --git a/zcash_client_backend/src/fees/fixed.rs b/zcash_client_backend/src/fees/fixed.rs index ec4fef86d..69aed61f6 100644 --- a/zcash_client_backend/src/fees/fixed.rs +++ b/zcash_client_backend/src/fees/fixed.rs @@ -17,7 +17,7 @@ use super::{ #[cfg(feature = "orchard")] use super::orchard as orchard_fees; -/// 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: FixedFeeRule, diff --git a/zcash_client_backend/src/fees/zip317.rs b/zcash_client_backend/src/fees/zip317.rs index fe08501e6..f09f50e9e 100644 --- a/zcash_client_backend/src/fees/zip317.rs +++ b/zcash_client_backend/src/fees/zip317.rs @@ -21,7 +21,7 @@ use super::{ #[cfg(feature = "orchard")] use super::orchard as orchard_fees; -/// 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: Zip317FeeRule, diff --git a/zcash_keys/src/encoding.rs b/zcash_keys/src/encoding.rs index a64970cda..1e86c17ee 100644 --- a/zcash_keys/src/encoding.rs +++ b/zcash_keys/src/encoding.rs @@ -76,13 +76,24 @@ where } } +/// A trait for encoding and decoding Zcash addresses. pub trait AddressCodec

where Self: std::marker::Sized, { type Error; + /// Encode a Zcash address. + /// + /// # Arguments + /// * `params` - The network the address is to be used on. fn encode(&self, params: &P) -> String; + + /// Decodes a Zcash address from its string representation. + /// + /// # Arguments + /// * `params` - The network the address is to be used on. + /// * `address` - The string representation of the address. fn decode(params: &P, address: &str) -> Result; } diff --git a/zcash_primitives/src/transaction/fees/zip317.rs b/zcash_primitives/src/transaction/fees/zip317.rs index c12a5cc1c..8b910cbcd 100644 --- a/zcash_primitives/src/transaction/fees/zip317.rs +++ b/zcash_primitives/src/transaction/fees/zip317.rs @@ -44,9 +44,9 @@ pub const MINIMUM_FEE: NonNegativeAmount = NonNegativeAmount::const_from_u64(10_ /// A [`FeeRule`] implementation that implements the [ZIP 317] fee rule. /// -/// This fee rule supports only P2pkh transparent inputs; an error will be returned if a coin -/// containing a non-p2pkh script is provided as an input. This fee rule may slightly overestimate -/// fees in case where the user is attempting to spend more than ~150 transparent inputs. +/// This fee rule supports inputs from orchard, sapling, and transparent pools (P2PKH only). +/// An error will be returned if a coin containing a non-p2pkh script is provided as an input. +/// This fee rule may slightly overestimate fees in case where the user is attempting to spend more than ~150 transparent inputs. /// /// [`FeeRule`]: crate::transaction::fees::FeeRule /// [ZIP 317]: https//zips.z.cash/zip-0317