Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jack Grigg <[email protected]>
  • Loading branch information
nuttycom and str4d committed Dec 30, 2024
1 parent 4bdf39c commit 1855385
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 22 deletions.
2 changes: 1 addition & 1 deletion zcash_client_backend/src/data_api/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use zcash_keys::{
keys::{UnifiedFullViewingKey, UnifiedSpendingKey},
};
use zcash_protocol::{PoolType, ShieldedProtocol};
use zip321::{self, Payment};
use zip321::Payment;

use super::InputSource;
use crate::{
Expand Down
1 change: 0 additions & 1 deletion zcash_client_sqlite/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use zcash_address::ParseError;
use zcash_client_backend::data_api::NoteFilter;
use zcash_keys::keys::AddressGenerationError;
use zcash_protocol::{consensus::BlockHeight, value::BalanceError, PoolType};
use zip32;

use crate::{wallet::commitment_tree, AccountUuid};

Expand Down
3 changes: 1 addition & 2 deletions zcash_client_sqlite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ use zcash_protocol::{
value::Zatoshis,
ShieldedProtocol,
};
use zip32::{self, fingerprint::SeedFingerprint, DiversifierIndex};
use zip32::{fingerprint::SeedFingerprint, DiversifierIndex};

use crate::{error::SqliteClientError, wallet::commitment_tree::SqliteShardStore};

Expand Down Expand Up @@ -2257,7 +2257,6 @@ mod tests {
pub(crate) fn fsblockdb_api() {
use zcash_client_backend::data_api::testing::AddressType;
use zcash_protocol::{consensus::NetworkConstants, value::Zatoshis};
use zip32;

use crate::testing::FsBlockCache;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ mod tests {
memo::MemoBytes,
value::Zatoshis,
};
use zip32::{self, Scope};
use zip32::Scope;

use crate::{
error::SqliteClientError,
Expand Down
8 changes: 2 additions & 6 deletions zcash_primitives/src/transaction/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::fmt;
use std::sync::mpsc::Sender;

use ::sapling::{
self,
builder::SaplingMetadata,
prover::{OutputProver, SpendProver},
Note, PaymentAddress,
Expand Down Expand Up @@ -994,10 +993,7 @@ mod testing {
use rand::RngCore;
use rand_core::CryptoRng;

use ::sapling::{
self,
prover::mock::{MockOutputProver, MockSpendProver},
};
use ::sapling::prover::mock::{MockOutputProver, MockSpendProver};
use ::transparent::builder::TransparentSigningSet;
use zcash_protocol::consensus;

Expand Down Expand Up @@ -1060,7 +1056,7 @@ mod tests {
use super::{Builder, Error};
use crate::transaction::builder::BuildConfig;

use ::sapling::{self, zip32::ExtendedSpendingKey, Node, Rseed};
use ::sapling::{zip32::ExtendedSpendingKey, Node, Rseed};
use ::transparent::{address::TransparentAddress, builder::TransparentSigningSet};
use zcash_protocol::{
consensus::{NetworkUpgrade, Parameters, TEST_NETWORK},
Expand Down
2 changes: 1 addition & 1 deletion zcash_primitives/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::fmt::Debug;
use std::io::{self, Read, Write};
use std::ops::Deref;

use ::sapling::{self, builder as sapling_builder};
use ::sapling::builder as sapling_builder;
use ::transparent::bundle::{self as transparent, OutPoint, TxIn, TxOut};
use zcash_encoding::{CompactSize, Vector};
use zcash_protocol::{
Expand Down
2 changes: 1 addition & 1 deletion zcash_primitives/src/transaction/sighash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::{
sighash_v4::v4_signature_hash, sighash_v5::v5_signature_hash, Authorization, TransactionData,
TxDigests, TxVersion,
};
use ::sapling::{self, bundle::GrothProofBytes};
use ::sapling::bundle::GrothProofBytes;

#[cfg(zcash_unstable = "zfuture")]
use {crate::extensions::transparent::Precondition, zcash_protocol::value::Zatoshis};
Expand Down
5 changes: 1 addition & 4 deletions zcash_primitives/src/transaction/sighash_v4.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use blake2b_simd::{Hash as Blake2bHash, Params as Blake2bParams};
use ff::PrimeField;

use ::sapling::{
self,
bundle::{GrothProofBytes, OutputDescription, SpendDescription},
};
use ::sapling::bundle::{GrothProofBytes, OutputDescription, SpendDescription};
use ::transparent::{
bundle::{self as transparent, TxIn, TxOut},
sighash::{SIGHASH_ANYONECANPAY, SIGHASH_MASK, SIGHASH_NONE, SIGHASH_SINGLE},
Expand Down
1 change: 0 additions & 1 deletion zcash_primitives/src/transaction/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use ::transparent::{address::Script, sighash::TransparentAuthorizingContext};
use zcash_protocol::{consensus::BranchId, value::Zatoshis};

use super::{
sapling,
sighash::SignableInput,
sighash_v4::v4_signature_hash,
sighash_v5::v5_signature_hash,
Expand Down
5 changes: 1 addition & 4 deletions zcash_primitives/src/transaction/txid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ use zcash_protocol::{
value::ZatBalance,
};

use ::sapling::{
self,
bundle::{OutputDescription, SpendDescription},
};
use ::sapling::bundle::{OutputDescription, SpendDescription};

use super::{
Authorization, Authorized, TransactionDigest, TransparentDigests, TxDigests, TxId, TxVersion,
Expand Down

0 comments on commit 1855385

Please sign in to comment.