Skip to content
Permalink
Browse files

rustfmt

  • Loading branch information...
vincenthz committed Jun 15, 2019
1 parent 97de59b commit 4e3f9219285e0ade39975ea81d4540e7f30b44d0
@@ -157,8 +157,12 @@ impl StakeDelegation {
// be included in the witness." - why?
use crate::key::make_signature;
match stake_private_key {
EitherEd25519SecretKey::Extended(sk) => SignatureRaw(make_signature(sk, &self).as_ref().to_vec()),
EitherEd25519SecretKey::Normal(sk) => SignatureRaw(make_signature(sk, &self).as_ref().to_vec()),
EitherEd25519SecretKey::Extended(sk) => {
SignatureRaw(make_signature(sk, &self).as_ref().to_vec())
}
EitherEd25519SecretKey::Normal(sk) => {
SignatureRaw(make_signature(sk, &self).as_ref().to_vec())
}
}
}
}
@@ -191,8 +195,12 @@ impl StakePoolInfo {
pub fn make_certificate(&self, pool_private_key: &EitherEd25519SecretKey) -> SignatureRaw {
use crate::key::make_signature;
match pool_private_key {
EitherEd25519SecretKey::Extended(sk) => SignatureRaw(make_signature(sk, &self).as_ref().to_vec()),
EitherEd25519SecretKey::Normal(sk) => SignatureRaw(make_signature(sk, &self).as_ref().to_vec()),
EitherEd25519SecretKey::Extended(sk) => {
SignatureRaw(make_signature(sk, &self).as_ref().to_vec())
}
EitherEd25519SecretKey::Normal(sk) => {
SignatureRaw(make_signature(sk, &self).as_ref().to_vec())
}
}
}
}
@@ -210,8 +218,12 @@ impl StakePoolRetirement {
pub fn make_certificate(&self, pool_private_key: &EitherEd25519SecretKey) -> SignatureRaw {
use crate::key::make_signature;
match pool_private_key {
EitherEd25519SecretKey::Extended(sk) => SignatureRaw(make_signature(sk, &self).as_ref().to_vec()),
EitherEd25519SecretKey::Normal(sk) => SignatureRaw(make_signature(sk, &self).as_ref().to_vec()),
EitherEd25519SecretKey::Extended(sk) => {
SignatureRaw(make_signature(sk, &self).as_ref().to_vec())
}
EitherEd25519SecretKey::Normal(sk) => {
SignatureRaw(make_signature(sk, &self).as_ref().to_vec())
}
}
}
}
@@ -4,7 +4,9 @@
use chain_core::mempack::{read_mut_slice, ReadBuf, ReadError, Readable};
use chain_core::property;
use chain_crypto as crypto;
use chain_crypto::{AsymmetricKey, SecretKey, AsymmetricPublicKey, SigningAlgorithm, VerificationAlgorithm};
use chain_crypto::{
AsymmetricKey, AsymmetricPublicKey, SecretKey, SigningAlgorithm, VerificationAlgorithm,
};
use rand::{CryptoRng, RngCore};

use std::str::FromStr;
@@ -212,8 +212,8 @@ impl Readable for Witness {
#[cfg(test)]
pub mod test {
use super::*;
use quickcheck::{Arbitrary, Gen};
use chain_crypto::SecretKey;
use quickcheck::{Arbitrary, Gen};

#[derive(Clone)]
pub struct TransactionSigningKey(pub EitherEd25519SecretKey);
@@ -233,7 +233,9 @@ pub mod test {
*byte = Arbitrary::arbitrary(g);
}
let mut rng = ChaChaRng::from_seed(seed);
TransactionSigningKey(EitherEd25519SecretKey::Extended(SecretKey::generate(&mut rng)))
TransactionSigningKey(EitherEd25519SecretKey::Extended(SecretKey::generate(
&mut rng,
)))
}
}

0 comments on commit 4e3f921

Please sign in to comment.
You can’t perform that action at this time.