Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updated cardano-deps to master
Adapted to rust-crypto trait changes, but the
network changes are left dangling for this commit.
  • Loading branch information
Mikhail Zabaluev committed May 14, 2019
1 parent ee38b87 commit ea03292
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cardano-deps
8 changes: 4 additions & 4 deletions utils/src/serde.rs
Expand Up @@ -6,7 +6,7 @@ use chain_crypto::{bech32::Bech32, Ed25519Extended, PublicKey};
use chain_impl_mockchain::leadership::bft::LeaderId; use chain_impl_mockchain::leadership::bft::LeaderId;
use serde::{ use serde::{
de::{Deserializer, Error as DeserializerError, Visitor}, de::{Deserializer, Error as DeserializerError, Visitor},
ser::{Error as _, Serializer}, ser::Serializer,
Deserialize, Serialize, Deserialize, Serialize,
}; };
use std::fmt::{self, Display}; use std::fmt::{self, Display};
Expand Down Expand Up @@ -130,12 +130,12 @@ pub mod witness {
pub mod crypto { pub mod crypto {
use super::*; use super::*;
use ::bech32::{Bech32 as Bech32Data, FromBase32 as _}; use ::bech32::{Bech32 as Bech32Data, FromBase32 as _};
use chain_crypto::{AsymmetricKey, Blake2b256, PublicKey, SecretKey}; use chain_crypto::{AsymmetricKey, Blake2b256, PublicKey, SecretKey, SecretKeySizeStatic};


pub fn deserialize_secret<'de, D, A>(deserializer: D) -> Result<SecretKey<A>, D::Error> pub fn deserialize_secret<'de, D, A>(deserializer: D) -> Result<SecretKey<A>, D::Error>
where where
D: Deserializer<'de>, D: Deserializer<'de>,
A: AsymmetricKey, A: SecretKeySizeStatic,
{ {
let secret_key_visitor = SecretKeyVisitor::new(); let secret_key_visitor = SecretKeyVisitor::new();
if deserializer.is_human_readable() { if deserializer.is_human_readable() {
Expand Down Expand Up @@ -244,7 +244,7 @@ pub mod crypto {


impl<'de, A> Visitor<'de> for SecretKeyVisitor<A> impl<'de, A> Visitor<'de> for SecretKeyVisitor<A>
where where
A: AsymmetricKey, A: SecretKeySizeStatic,
{ {
type Value = SecretKey<A>; type Value = SecretKey<A>;


Expand Down

0 comments on commit ea03292

Please sign in to comment.