Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
sanlee42 committed Jun 18, 2024
1 parent d80d068 commit f7c4571
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sync/src/block_connector/write_block_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
use crate::block_connector::metrics::ChainMetrics;
use anyhow::{format_err, Ok, Result};
use starcoin_chain::BlockChain;
use starcoin_chain_api::{ChainReader, ChainWriter, ConnectBlockError, WriteableChainService};
use starcoin_chain_api::{
ChainReader, ChainType, ChainWriter, ConnectBlockError, WriteableChainService,
};
use starcoin_config::NodeConfig;
#[cfg(test)]
use starcoin_consensus::Consensus;
Expand All @@ -16,7 +18,7 @@ use starcoin_service_registry::bus::{Bus, BusService};
use starcoin_service_registry::{ServiceContext, ServiceRef};
use starcoin_storage::Store;
use starcoin_txpool_api::TxPoolSyncService;
use starcoin_types::block::{BlockInfo, DagHeaderType};
use starcoin_types::block::BlockInfo;
use starcoin_types::system_events::NewDagBlock;
#[cfg(test)]
use starcoin_types::{account::Account, block::BlockNumber};

Check failure on line 24 in sync/src/block_connector/write_block_chain.rs

View workflow job for this annotation

GitHub Actions / build and test

unused imports: `account::Account`, `block::BlockNumber`
Expand Down Expand Up @@ -535,7 +537,7 @@ where
}

// the single chain no need to broadcast the block, it is only for dag
if chain.check_dag_type(chain.status().head())? == DagHeaderType::Single {
if chain.check_chain_type()? == ChainType::Single {
return Ok(());
}

Expand Down

0 comments on commit f7c4571

Please sign in to comment.