Add QueueingHoneyBadger::dyn_hb.

Needed to retrieve netinfo.
This commit is contained in:
c0gent 2018-07-13 08:30:02 -07:00
parent c12bb58ac0
commit 28da78c709
No known key found for this signature in database
GPG Key ID: 9CC25E71A743E892
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();