From 17339c322c9628a53625773a45f8e1739a3129b8 Mon Sep 17 00:00:00 2001 From: Vladimir Komendantskiy Date: Wed, 18 Jul 2018 15:00:59 +0100 Subject: [PATCH] added a typedef for the Queueing HB propose result --- src/queueing_honey_badger.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/queueing_honey_badger.rs b/src/queueing_honey_badger.rs index 6c35c47..40c37f9 100644 --- a/src/queueing_honey_badger.rs +++ b/src/queueing_honey_badger.rs @@ -178,6 +178,11 @@ where } } +type ProposeResult = Result<( + FaultLog, + VecDeque, NodeUid>>, +)>; + impl QueueingHoneyBadger where Tx: Eq + Serialize + for<'r> Deserialize<'r> + Debug + Hash + Clone, @@ -210,12 +215,7 @@ where } /// Initiates the next epoch by proposing a batch from the queue. - fn propose( - &mut self, - ) -> Result<( - FaultLog, - VecDeque, NodeUid>>, - )> { + fn propose(&mut self) -> ProposeResult { let amount = cmp::max(1, self.batch_size / self.dyn_hb.netinfo().num_nodes()); // TODO: This will loop forever if we are the only validator. let mut fault_log = FaultLog::new();