Clippy tidy
This commit is contained in:
parent
a241cb536a
commit
48dbcab00e
|
|
@ -3,16 +3,13 @@
|
||||||
use std::{fmt, io};
|
use std::{fmt, io};
|
||||||
|
|
||||||
use bs58;
|
use bs58;
|
||||||
use sha2::Sha256;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*};
|
use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
keys::sprout,
|
keys::sprout,
|
||||||
serialization::{
|
serialization::{ReadZcashExt, SerializationError, ZcashDeserialize, ZcashSerialize},
|
||||||
ReadZcashExt, SerializationError, WriteZcashExt, ZcashDeserialize, ZcashSerialize,
|
|
||||||
},
|
|
||||||
Network,
|
Network,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,6 @@
|
||||||
//!
|
//!
|
||||||
//! [ps]: https://zips.z.cash/protocol/protocol.pdf#sproutkeycomponents
|
//! [ps]: https://zips.z.cash/protocol/protocol.pdf#sproutkeycomponents
|
||||||
|
|
||||||
use std::{
|
|
||||||
fmt,
|
|
||||||
io::{self},
|
|
||||||
};
|
|
||||||
|
|
||||||
use byteorder::{ByteOrder, LittleEndian};
|
use byteorder::{ByteOrder, LittleEndian};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
@ -20,8 +15,6 @@ use proptest_derive::Arbitrary;
|
||||||
|
|
||||||
use sha2::sha256_utils::compress256;
|
use sha2::sha256_utils::compress256;
|
||||||
|
|
||||||
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
|
|
||||||
|
|
||||||
/// Our root secret key of the Sprout key derivation tree.
|
/// Our root secret key of the Sprout key derivation tree.
|
||||||
///
|
///
|
||||||
/// All other Sprout key types derive from the SpendingKey value.
|
/// All other Sprout key types derive from the SpendingKey value.
|
||||||
|
|
@ -44,7 +37,7 @@ impl From<SpendingKey> for ReceivingKey {
|
||||||
let mut block = [0u8; 64]; // Thus, t = 0
|
let mut block = [0u8; 64]; // Thus, t = 0
|
||||||
|
|
||||||
block[0..32].copy_from_slice(&spending_key.0[..]);
|
block[0..32].copy_from_slice(&spending_key.0[..]);
|
||||||
block[0] |= 0b11000000;
|
block[0] |= 0b1100_0000;
|
||||||
|
|
||||||
compress256(&mut state, &block);
|
compress256(&mut state, &block);
|
||||||
|
|
||||||
|
|
@ -69,7 +62,7 @@ impl From<SpendingKey> for PayingKey {
|
||||||
let mut block = [0u8; 64];
|
let mut block = [0u8; 64];
|
||||||
|
|
||||||
block[0..32].copy_from_slice(&spending_key.0[..]);
|
block[0..32].copy_from_slice(&spending_key.0[..]);
|
||||||
block[0] |= 0b11000000;
|
block[0] |= 0b1100_0000;
|
||||||
|
|
||||||
block[32] = 1u8; // t = 1
|
block[32] = 1u8; // t = 1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue