Fix minimal NetworkDimension in tests, and Subset bug. (#303)

* Fix minimal NetworkDimension in tests.

* Fix: Subset must try output on broadcast results, too.
This commit is contained in:
Andreas Fackler 2018-10-28 15:05:26 +01:00 committed by GitHub
parent 45ce045922
commit a331982fa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -247,7 +247,9 @@ impl<N: NodeIdT + Rand> Subset<N> {
error!("Duplicate insert in broadcast_results: {:?}", inval)
}
let set_binary_agreement_input = |ba: &mut BinaryAgreement<N>| ba.handle_input(true);
Ok(step.join(self.process_binary_agreement(proposer_id, set_binary_agreement_input)?))
Ok(step
.join(self.process_binary_agreement(proposer_id, set_binary_agreement_input)?)
.with_output(self.try_binary_agreement_completion()))
}
/// Callback to be invoked on receipt of the decision value of the Binary Agreement
@ -351,7 +353,8 @@ impl<N: NodeIdT + Rand> Subset<N> {
.map(|(k, _)| k)
.collect();
debug!(
"Binary Agreement instances that delivered 1: {:?}",
"{:?} Binary Agreement instances that delivered 1: {:?}",
self.our_id(),
delivered_1
);

View File

@ -135,7 +135,7 @@ impl NetworkDimensionTree {
NetworkDimensionTree {
high: high.into(),
current: high.into(),
low: 0,
low: u32::from(min_size),
}
}
}