Skip to content

Commit

Permalink
[review] address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
akichidis committed Jan 30, 2025
1 parent 796bd39 commit 0d010d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion consensus/core/src/authority_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,6 @@ mod tests {
}
}

#[async_trait]
#[async_trait]
impl CoreThreadDispatcher for FakeCoreThreadDispatcher {
async fn add_blocks(
Expand Down
6 changes: 4 additions & 2 deletions consensus/core/src/block_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@ impl BlockManager {
/// Tries to accept the provided blocks assuming that all their causal history exists. The method
/// returns all the blocks that have been successfully processed in round ascending order, that includes also previously
/// suspended blocks that have now been able to get accepted. Method also returns a set with the missing ancestor blocks.
/// When the `commit_sync_gc_round_override` is > 0 then the method will skip any missing ancestors that are <= `commit_sync_gc_round_override` round. This
/// is a special handling case when we are processing blocks via the committed sub dags.
pub(crate) fn try_accept_blocks(
&mut self,
mut blocks: Vec<VerifiedBlock>,
) -> (Vec<VerifiedBlock>, BTreeSet<BlockRef>) {
let _s = monitored_scope("BlockManager::try_accept_blocks");

blocks.sort_by_key(|b| b.round());
debug!(
"Trying to accept blocks: {}",
blocks.iter().map(|b| b.reference().to_string()).join(",")
);

let mut accepted_blocks = vec![];
let mut missing_blocks = BTreeSet::new();
Expand Down
3 changes: 1 addition & 2 deletions consensus/core/src/universal_committer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::{collections::VecDeque, mem, sync::Arc};
use consensus_config::AuthorityIndex;
use itertools::Itertools;
use parking_lot::RwLock;
use tracing::info;

use crate::{
base_committer::BaseCommitter,
Expand Down Expand Up @@ -139,7 +138,7 @@ impl UniversalCommitter {
.first()
.expect("Synced commits should not be empty");
if synced_commit.index() <= last_commit_index {
info!(
tracing::debug!(
"Skip commit for index {} as it is already committed with last commit index {}",
synced_commit.index(),
last_commit_index
Expand Down

0 comments on commit 0d010d7

Please sign in to comment.