diff --git a/src/runtime/consensus.rs b/src/runtime/consensus.rs index af043c10367dba4b228e5d5eb460ee29180a62c2..1147f447ef8a25ef9a8b8e0754c36b4527efdfc0 100644 --- a/src/runtime/consensus.rs +++ b/src/runtime/consensus.rs @@ -172,7 +172,6 @@ impl Consensus { // the consensus algorithm let branch = &self.branch_annotations[failed_branch_id.index as usize]; if branch.channel_mapping.iter().all(|v| v.registered_id.is_none()) { - println!("DEBUG: Failure everything silent"); return Some(RoundConclusion::Failure); } @@ -302,7 +301,6 @@ impl Consensus { let _branch = &self.branch_annotations[branch_id.index as usize]; // Clear out internal storage to defaults - println!("DEBUG: ***** Incrementing sync round stuff"); self.highest_connector_id = ConnectorId::new_invalid(); self.branch_annotations.clear(); self.branch_markers.clear(); @@ -319,8 +317,6 @@ impl Consensus { peer.encountered_this_round = false; peer.expected_sync_round += 1; } - - println!("DEBUG: ***** Peers post round are:\n{:#?}", &self.peers) } // --- Handling messages @@ -432,7 +428,6 @@ impl Consensus { }, SyncCompContent::GlobalFailure => { // Global failure of round, send Ack to leader - println!("DEBUGERINO: Got GlobalFailure, sending Ack in response"); debug_assert_ne!(self.highest_connector_id, ctx.id); // not the leader let _result = self.send_to_leader_or_handle_as_leader(SyncCompContent::AckFailure, ctx); debug_assert!(_result.is_none()); @@ -591,7 +586,6 @@ impl Consensus { fn handle_received_sync_header(&mut self, sync_header: SyncHeader, ctx: &mut ComponentCtx) -> MessageOrigin { debug_assert!(sync_header.sending_component_id != ctx.id); // not sending to ourselves let origin = self.handle_peer(&sync_header); - println!(" ********************** GOT {:?}", origin); if origin != MessageOrigin::Present { // We do not have to handle it now return origin; @@ -809,7 +803,6 @@ impl Consensus { } } - println!("DEBUGERINO: Leader entering error state, we need to wait on {:?}", encountered.iter().map(|v| v.index).collect::>()); self.conclusion = Some(RoundConclusion::Failure); if encountered.is_empty() { // We don't have to wait on Acks @@ -845,7 +838,6 @@ impl Consensus { let maybe_conclusion = self.send_to_leader_or_handle_as_leader(SyncCompContent::LocalFailure, ctx); debug_assert!(if maybe_already.is_some() { maybe_conclusion.is_some() } else { true }); - println!("DEBUG: Maybe conclusion is {:?}", maybe_conclusion); // Initiate a discovery wave so peers can do the same self.handled_wave = true; @@ -1225,8 +1217,6 @@ impl SolutionCombiner { } } - println!("DEBUGGERINO Presence is now:\n{:#?}", self.presence); - return self.check_for_global_failure(); } @@ -1473,11 +1463,9 @@ impl SolutionCombiner { } // Handle channel presence - println!("DEBUGERINO: Presence before joining is {:#?}", &self.presence); if self.presence.is_empty() { // Trivial case self.presence = combiner.presence; - println!("DEBUGERINO: Trivial merging") } else { for presence in combiner.presence { match self.presence.iter_mut().find(|v| v.id == presence.id) { @@ -1509,11 +1497,9 @@ impl SolutionCombiner { } } } - println!("DEBUGERINO: Presence after joining is {:#?}", &self.presence); // After adding everything we might have immediately found a solution if self.check_for_global_failure() { - println!("DEBUG: Returning immediate failure?"); return Some(LeaderConclusion::Failure); } }