From 6ed6ccd62ee5ebb40b81b99a5a6404e83a5cb91c Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Wed, 29 Apr 2020 21:30:16 -0400 Subject: [PATCH] Clean up imports and some doc comments --- zebra-chain/src/addresses/sprout.rs | 12 +----------- zebra-chain/src/addresses/transparent.rs | 1 - zebra-chain/src/keys/sapling.rs | 5 +---- zebra-chain/src/keys/sprout.rs | 1 - zebra-chain/src/note_commitment_tree.rs | 2 -- 5 files changed, 2 insertions(+), 19 deletions(-) diff --git a/zebra-chain/src/addresses/sprout.rs b/zebra-chain/src/addresses/sprout.rs index 018898d4..cb06dedb 100644 --- a/zebra-chain/src/addresses/sprout.rs +++ b/zebra-chain/src/addresses/sprout.rs @@ -2,8 +2,6 @@ use std::{fmt, io}; -use bs58; - #[cfg(test)] use proptest::{arbitrary::Arbitrary, array, prelude::*}; @@ -22,15 +20,7 @@ mod magics { /// Sprout Shielded Payment Addresses /// -/// In Bitcoin a single byte is used for the version field identifying -/// the address type. In Zcash two bytes are used. For addresses on -/// the production network, this and the encoded length cause the first -/// two characters of the Base58Check encoding to be fixed as “t3” for -/// P2SH addresses, and as “t1” for P2PKH addresses. (This does not -/// imply that a transparent Zcash address can be parsed identically -/// to a Bitcoin address just by removing the “t”.) -/// -/// https://zips.z.cash/protocol/protocol.pdf#transparentaddrencoding +/// https://zips.z.cash/protocol/protocol.pdf#sproutpaymentaddrencoding #[derive(Copy, Clone)] pub struct SproutShieldedAddress { network: Network, diff --git a/zebra-chain/src/addresses/transparent.rs b/zebra-chain/src/addresses/transparent.rs index 1dd6f2ff..58cdb943 100644 --- a/zebra-chain/src/addresses/transparent.rs +++ b/zebra-chain/src/addresses/transparent.rs @@ -2,7 +2,6 @@ use std::{fmt, io}; -use bs58; use ripemd160::{Digest, Ripemd160}; use secp256k1::PublicKey; use sha2::Sha256; diff --git a/zebra-chain/src/keys/sapling.rs b/zebra-chain/src/keys/sapling.rs index 34293c25..f08c1537 100644 --- a/zebra-chain/src/keys/sapling.rs +++ b/zebra-chain/src/keys/sapling.rs @@ -21,9 +21,6 @@ use std::{ }; use bech32::{self, FromBase32, ToBase32}; -use blake2b_simd; -use blake2s_simd; -use jubjub; use rand_core::{CryptoRng, RngCore}; use redjubjub::{self, SpendAuth}; @@ -175,7 +172,7 @@ mod sk_hrp { /// §4.2.2][ps]. /// /// Our root secret key of the Sapling key derivation tree. All other -/// Sprout key types derive from the SpendingKey value. +/// Sapling key types derive from the SpendingKey value. /// /// [ps]: https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents #[derive(Copy, Clone, Debug, Eq, PartialEq)] diff --git a/zebra-chain/src/keys/sprout.rs b/zebra-chain/src/keys/sprout.rs index 3d31206a..b0525175 100644 --- a/zebra-chain/src/keys/sprout.rs +++ b/zebra-chain/src/keys/sprout.rs @@ -10,7 +10,6 @@ use std::{fmt, io}; use byteorder::{ByteOrder, LittleEndian}; use rand_core::{CryptoRng, RngCore}; -use sha2; #[cfg(test)] use proptest::{array, prelude::*}; diff --git a/zebra-chain/src/note_commitment_tree.rs b/zebra-chain/src/note_commitment_tree.rs index 975e02bf..19f1bd8b 100644 --- a/zebra-chain/src/note_commitment_tree.rs +++ b/zebra-chain/src/note_commitment_tree.rs @@ -12,8 +12,6 @@ use std::{fmt, io}; -use hex; - #[cfg(test)] use proptest_derive::Arbitrary;