diff --git a/zebra-chain/src/addresses/sprout.rs b/zebra-chain/src/addresses/sprout.rs index f76aa62d..8a76186a 100644 --- a/zebra-chain/src/addresses/sprout.rs +++ b/zebra-chain/src/addresses/sprout.rs @@ -3,16 +3,13 @@ use std::{fmt, io}; use bs58; -use sha2::Sha256; #[cfg(test)] use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*}; use crate::{ keys::sprout, - serialization::{ - ReadZcashExt, SerializationError, WriteZcashExt, ZcashDeserialize, ZcashSerialize, - }, + serialization::{ReadZcashExt, SerializationError, ZcashDeserialize, ZcashSerialize}, Network, }; diff --git a/zebra-chain/src/keys/sprout.rs b/zebra-chain/src/keys/sprout.rs index 943a3297..2fbb25c2 100644 --- a/zebra-chain/src/keys/sprout.rs +++ b/zebra-chain/src/keys/sprout.rs @@ -6,11 +6,6 @@ //! //! [ps]: https://zips.z.cash/protocol/protocol.pdf#sproutkeycomponents -use std::{ - fmt, - io::{self}, -}; - use byteorder::{ByteOrder, LittleEndian}; #[cfg(test)] @@ -20,8 +15,6 @@ use proptest_derive::Arbitrary; use sha2::sha256_utils::compress256; -use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize}; - /// Our root secret key of the Sprout key derivation tree. /// /// All other Sprout key types derive from the SpendingKey value. @@ -44,7 +37,7 @@ impl From for ReceivingKey { let mut block = [0u8; 64]; // Thus, t = 0 block[0..32].copy_from_slice(&spending_key.0[..]); - block[0] |= 0b11000000; + block[0] |= 0b1100_0000; compress256(&mut state, &block); @@ -69,7 +62,7 @@ impl From for PayingKey { let mut block = [0u8; 64]; block[0..32].copy_from_slice(&spending_key.0[..]); - block[0] |= 0b11000000; + block[0] |= 0b1100_0000; block[32] = 1u8; // t = 1