fixed early output from Subset

This commit is contained in:
Vladimir Komendantskiy 2018-10-25 10:04:30 +01:00 committed by Andreas Fackler
parent 3981b37fa3
commit 7aad658511
1 changed files with 5 additions and 1 deletions

View File

@ -311,7 +311,11 @@ impl<N: NodeIdT + Rand> Subset<N> {
}
}
}
if let Some(Some(value)) = self.broadcast_results.insert(proposer_id.clone(), None) {
if let Some(value) = self
.broadcast_results
.get_mut(proposer_id)
.and_then(Option::take)
{
debug!(" {:?} → {:0.10}", proposer_id, HexFmt(&value));
step.output
.extend(Some(SubsetOutput::Contribution(proposer_id.clone(), value)));