From 4c2e92e63d517ffb76830d00d9d16ba4228b3b16 Mon Sep 17 00:00:00 2001 From: Vladimir Komendantskiy Date: Fri, 22 Jun 2018 10:17:11 +0100 Subject: [PATCH] removed the obsolete Bls12 type parameters --- src/honey_badger.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/honey_badger.rs b/src/honey_badger.rs index a6607ba..0b0ee05 100644 --- a/src/honey_badger.rs +++ b/src/honey_badger.rs @@ -6,7 +6,6 @@ use std::rc::Rc; use std::{cmp, iter}; use bincode; -use pairing::bls12_381::Bls12; use rand; use serde::de::DeserializeOwned; use serde::Serialize; @@ -55,11 +54,11 @@ pub struct HoneyBadger { /// Received decryption shares for an epoch. Each decryption share has a sender and a /// proposer. The outer `BTreeMap` has epochs as its key. The next `BTreeMap` has proposers as /// its key. The inner `BTreeMap` has the sender as its key. - received_shares: BTreeMap>>>, + received_shares: BTreeMap>>, /// Decoded accepted proposals. decrypted_selections: BTreeMap>, /// Ciphertexts output by Common Subset in an epoch. - ciphertexts: BTreeMap>>, + ciphertexts: BTreeMap>, } impl DistAlgorithm for HoneyBadger @@ -228,7 +227,7 @@ where sender_id: &NodeUid, epoch: u64, proposer_id: NodeUid, - share: DecryptionShare, + share: DecryptionShare, ) -> HoneyBadgerResult<()> { if let Some(ciphertext) = self .ciphertexts @@ -265,8 +264,8 @@ where fn verify_decryption_share( &self, sender_id: &NodeUid, - share: &DecryptionShare, - ciphertext: &Ciphertext, + share: &DecryptionShare, + ciphertext: &Ciphertext, ) -> bool { let sender: u64 = *self.netinfo.node_index(sender_id).unwrap() as u64; let pk = self.netinfo.public_key_set().public_key_share(sender); @@ -405,7 +404,7 @@ where cs_output: BTreeMap>, ) -> Result<(), Error> { for (proposer_id, v) in cs_output { - let mut ciphertext: Ciphertext; + let mut ciphertext: Ciphertext; if let Ok(ct) = bincode::deserialize(&v) { ciphertext = ct; } else { @@ -450,7 +449,7 @@ where fn verify_pending_decryption_shares( &self, proposer_id: &NodeUid, - ciphertext: &Ciphertext, + ciphertext: &Ciphertext, ) -> BTreeSet { let mut incorrect_senders = BTreeSet::new(); if let Some(sender_shares) = self @@ -555,7 +554,7 @@ pub enum MessageContent { /// A decrypted share of the output of `proposer_id`. DecryptionShare { proposer_id: NodeUid, - share: DecryptionShare, + share: DecryptionShare, }, }