From d61222b683cc204f64563c1420eabb4b141a1b3b Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Thu, 7 Dec 2023 15:03:39 +0100 Subject: [PATCH] Restore insertion of proposal --- Code/driver/src/driver.rs | 8 +++++++- Code/driver/src/mux.rs | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Code/driver/src/driver.rs b/Code/driver/src/driver.rs index fb259a4de..40f5e0133 100644 --- a/Code/driver/src/driver.rs +++ b/Code/driver/src/driver.rs @@ -176,7 +176,13 @@ where ) -> Result>, Error> { 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), } diff --git a/Code/driver/src/mux.rs b/Code/driver/src/mux.rs index 03c83a875..a1f02cce6 100644 --- a/Code/driver/src/mux.rs +++ b/Code/driver/src/mux.rs @@ -13,6 +13,7 @@ use crate::Validity; pub fn multiplex_proposal( round_state: &RoundState, votekeeper: &VoteKeeper, + proposals: &mut Proposals, proposal: Ctx::Proposal, validity: Validity, ) -> Option> @@ -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,