diff --git a/zcash_client_backend/src/data_api.rs b/zcash_client_backend/src/data_api.rs index caa07e8ace..9068be5527 100644 --- a/zcash_client_backend/src/data_api.rs +++ b/zcash_client_backend/src/data_api.rs @@ -1001,7 +1001,7 @@ pub trait WalletRead { Ok(vec![]) } - /// If a given transparent address has been reserved, i.e. would be included in + /// If a given ephemeral address might have been reserved, i.e. would be included in /// the map returned by `get_known_ephemeral_addresses(account_id, false)` for any /// of the wallet's accounts, then return `Ok(Some(account_id))`. Otherwise return /// `Ok(None)`. diff --git a/zcash_client_backend/src/data_api/wallet/input_selection.rs b/zcash_client_backend/src/data_api/wallet/input_selection.rs index 7ffc873829..7374aeee26 100644 --- a/zcash_client_backend/src/data_api/wallet/input_selection.rs +++ b/zcash_client_backend/src/data_api/wallet/input_selection.rs @@ -384,6 +384,9 @@ where let mut tr1_payments = vec![]; #[cfg(feature = "transparent-inputs")] let mut tr1_payment_pools = BTreeMap::new(); + // this balance value is just used for overflow checking; the actual value of ephemeral + // outputs will be computed from the constructed `tr1_transparent_outputs` value + // constructed below. #[cfg(feature = "transparent-inputs")] let mut total_ephemeral = NonNegativeAmount::ZERO; diff --git a/zcash_client_sqlite/src/wallet/transparent/ephemeral.rs b/zcash_client_sqlite/src/wallet/transparent/ephemeral.rs index a700168857..461261de6e 100644 --- a/zcash_client_sqlite/src/wallet/transparent/ephemeral.rs +++ b/zcash_client_sqlite/src/wallet/transparent/ephemeral.rs @@ -187,7 +187,7 @@ pub(crate) fn find_index_for_ephemeral_address_str( Ok(conn .query_row( "SELECT address_index FROM ephemeral_addresses - WHERE account_id = :account_id AND address = :address", + WHERE account_id = :account_id AND address = :address", named_params![":account_id": account_id.0, ":address": &address_str], |row| row.get::<_, u32>(0), ) diff --git a/zcash_primitives/src/legacy/keys.rs b/zcash_primitives/src/legacy/keys.rs index c7b7c610a2..25a20eed1a 100644 --- a/zcash_primitives/src/legacy/keys.rs +++ b/zcash_primitives/src/legacy/keys.rs @@ -21,10 +21,11 @@ use super::TransparentAddress; pub struct TransparentKeyScope(u32); impl TransparentKeyScope { - /// Returns an arbitrary custom `TransparentKeyScope`. This should be used - /// with care: funds associated with keys derived under a custom scope may - /// not be recoverable if the wallet seed is restored in another wallet. - /// It is usually preferable to use standardized key scopes. + /// Returns an arbitrary custom `TransparentKeyScope`. + /// + /// This should be used with care: funds associated with keys derived under a custom + /// scope may not be recoverable if the wallet seed is restored in another wallet. It + /// is usually preferable to use standardized key scopes. pub const fn custom(i: u32) -> Option { if i < (1 << 31) { Some(TransparentKeyScope(i))