From 0348af63dc728c0a362ff8b2a1ef2d92f0b6aa25 Mon Sep 17 00:00:00 2001 From: Daira-Emma Hopwood Date: Thu, 22 Aug 2024 15:11:04 +0100 Subject: [PATCH] Make `zcash_client_backend::fees::{fixed,standard,zip317}::SingleOutputChangeStrategy` doc comments more accurate concerning the choice of output pool. Signed-off-by: Daira-Emma Hopwood --- zcash_client_backend/src/fees/fixed.rs | 6 ++++-- zcash_client_backend/src/fees/standard.rs | 6 ++++-- zcash_client_backend/src/fees/zip317.rs | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/zcash_client_backend/src/fees/fixed.rs b/zcash_client_backend/src/fees/fixed.rs index 933b00820..d2033eba0 100644 --- a/zcash_client_backend/src/fees/fixed.rs +++ b/zcash_client_backend/src/fees/fixed.rs @@ -19,8 +19,10 @@ use super::{ #[cfg(feature = "orchard")] use super::orchard as orchard_fees; -/// 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. +/// A change strategy that proposes change as a single output. The output pool is chosen +/// as the most current pool that avoids unnecessary pool-crossing (with a specified +/// fallback when the transaction has no shielded inputs). Fee calculation is delegated +/// to the provided fee rule. pub struct SingleOutputChangeStrategy { fee_rule: FixedFeeRule, change_memo: Option, diff --git a/zcash_client_backend/src/fees/standard.rs b/zcash_client_backend/src/fees/standard.rs index 5c08c7b1a..4cad64c5d 100644 --- a/zcash_client_backend/src/fees/standard.rs +++ b/zcash_client_backend/src/fees/standard.rs @@ -24,8 +24,10 @@ use super::{ #[cfg(feature = "orchard")] use super::orchard as orchard_fees; -/// 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. +/// A change strategy that proposes change as a single output. The output pool is chosen +/// as the most current pool that avoids unnecessary pool-crossing (with a specified +/// fallback when the transaction has no shielded inputs). Fee calculation is delegated +/// to the provided fee rule. pub struct SingleOutputChangeStrategy { fee_rule: StandardFeeRule, change_memo: Option, diff --git a/zcash_client_backend/src/fees/zip317.rs b/zcash_client_backend/src/fees/zip317.rs index c5cd7d499..d8813e361 100644 --- a/zcash_client_backend/src/fees/zip317.rs +++ b/zcash_client_backend/src/fees/zip317.rs @@ -23,8 +23,10 @@ use super::{ #[cfg(feature = "orchard")] use super::orchard as orchard_fees; -/// 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. +/// A change strategy that proposes change as a single output. The output pool is chosen +/// as the most current pool that avoids unnecessary pool-crossing (with a specified +/// fallback when the transaction has no shielded inputs). Fee calculation is delegated +/// to the provided fee rule. pub struct SingleOutputChangeStrategy { fee_rule: Zip317FeeRule, change_memo: Option,