Skip to content

Commit

Permalink
Restore insertion of proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Dec 7, 2023
1 parent 9993707 commit d61222b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Code/driver/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,13 @@ where
) -> Result<Option<RoundOutput<Ctx>>, Error<Ctx>> {
let round = proposal.round();

match mux::multiplex_proposal(&self.round_state, &self.votes, proposal, validity) {
match mux::multiplex_proposal(
&self.round_state,
&self.votes,
&mut self.proposals,
proposal,
validity,
) {
Some(round_input) => self.apply_input(round, round_input),
None => Ok(None),
}
Expand Down
4 changes: 4 additions & 0 deletions Code/driver/src/mux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use crate::Validity;
pub fn multiplex_proposal<Ctx>(
round_state: &RoundState<Ctx>,
votekeeper: &VoteKeeper<Ctx>,
proposals: &mut Proposals<Ctx>,
proposal: Ctx::Proposal,
validity: Validity,
) -> Option<RoundInput<Ctx>>
Expand All @@ -29,6 +30,9 @@ where
return None;
}

// Store the proposal
proposals.insert(proposal.clone());

let polka_for_pol = votekeeper.is_threshold_met(
&proposal.pol_round(),
VoteType::Prevote,
Expand Down

0 comments on commit d61222b

Please sign in to comment.