mirror of https://github.com/poanetwork/hbbft.git
Merge pull request #240 from poanetwork/afck-itertools
Remove itertools dependency.
This commit is contained in:
commit
70fe9cd506
|
@ -22,7 +22,6 @@ byteorder = "1.2.3"
|
|||
env_logger = "0.5.10"
|
||||
failure = "0.1"
|
||||
init_with = "1.1.0"
|
||||
itertools = "0.7"
|
||||
log = "0.4.1"
|
||||
pairing = { version = "0.14.2", features = ["u128-support"] }
|
||||
rand = "0.4.2"
|
||||
|
@ -38,6 +37,7 @@ colored = "1.6"
|
|||
crossbeam = "0.3.2"
|
||||
crossbeam-channel = "0.1"
|
||||
docopt = "1.0"
|
||||
itertools = "0.7"
|
||||
serde_derive = "1.0.55"
|
||||
signifix = "0.9"
|
||||
proptest = "0.8.6"
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
use std::collections::BTreeMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use itertools::Itertools;
|
||||
|
||||
use super::bool_multimap::BoolMultimap;
|
||||
use super::bool_set::BoolSet;
|
||||
use super::sbv_broadcast::{self, SbvBroadcast};
|
||||
|
@ -393,7 +391,11 @@ impl<N: NodeIdT> BinaryAgreement<N> {
|
|||
self.estimated = Some(b);
|
||||
let sbvb_step = self.sbv_broadcast.handle_input(b)?;
|
||||
let mut step = self.handle_sbvb_step(sbvb_step)?;
|
||||
let queued_msgs = Itertools::flatten(self.incoming_queue.remove(&self.epoch).into_iter());
|
||||
let queued_msgs = self
|
||||
.incoming_queue
|
||||
.remove(&self.epoch)
|
||||
.into_iter()
|
||||
.flatten();
|
||||
for (sender_id, content) in queued_msgs {
|
||||
step.extend(self.handle_message_content(&sender_id, content)?);
|
||||
if self.decision.is_some() {
|
||||
|
|
|
@ -3,7 +3,6 @@ use std::fmt::{self, Debug};
|
|||
use std::sync::Arc;
|
||||
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
use itertools::Itertools;
|
||||
use rand;
|
||||
use reed_solomon_erasure as rse;
|
||||
use reed_solomon_erasure::ReedSolomon;
|
||||
|
@ -498,7 +497,7 @@ fn decode_from_shards(
|
|||
/// and forgetting the leaves that contain parity information.
|
||||
fn glue_shards(m: MerkleTree<Vec<u8>>, n: usize) -> Option<Vec<u8>> {
|
||||
// Create an iterator over the shard payload, drop the index bytes.
|
||||
let mut bytes = Itertools::flatten(m.into_values().into_iter().take(n));
|
||||
let mut bytes = m.into_values().into_iter().take(n).flatten();
|
||||
let payload_len = match (bytes.next(), bytes.next(), bytes.next(), bytes.next()) {
|
||||
(Some(b0), Some(b1), Some(b2), Some(b3)) => BigEndian::read_u32(&[b0, b1, b2, b3]) as usize,
|
||||
_ => return None, // The proposing node is faulty: no payload size.
|
||||
|
|
|
@ -125,7 +125,6 @@ extern crate failure;
|
|||
extern crate init_with;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate itertools;
|
||||
extern crate pairing;
|
||||
extern crate rand;
|
||||
#[macro_use]
|
||||
|
|
Loading…
Reference in New Issue