Merge pull request #134 from c0gent/c0gent-hydrabadger-dyn_hb

Add QueueingHoneyBadger::dyn_hb.
This commit is contained in:
Nick Sanders 2018-07-13 10:38:13 -07:00 committed by GitHub
commit b30d272394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -189,6 +189,11 @@ where
QueueingHoneyBadgerBuilder::new(netinfo)
}
/// Returns a reference to the internal `DynamicHoneyBadger` instance.
pub fn dyn_hb(&self) -> &DynamicHoneyBadger<Vec<Tx>, NodeUid> {
&self.dyn_hb
}
/// Initiates the next epoch by proposing a batch from the queue.
fn propose(&mut self) -> Result<FaultLog<NodeUid>> {
let amount = self.batch_size / self.dyn_hb.netinfo().num_nodes();