fix: rust fmt

This commit is contained in:
MiniFrenchBread 2024-09-19 18:24:19 +08:00
parent d365eff11d
commit cabdad133f

View File

@ -7,12 +7,12 @@ use ethers::{prelude::Middleware, types::BlockNumber};
use futures::FutureExt; use futures::FutureExt;
use jsonrpsee::tracing::{debug, error, warn}; use jsonrpsee::tracing::{debug, error, warn};
use shared_types::{bytes_to_chunks, ChunkArray, Transaction}; use shared_types::{bytes_to_chunks, ChunkArray, Transaction};
use storage::log_store::log_manager::{sector_to_segment};
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::fmt::Debug; use std::fmt::Debug;
use std::future::Future; use std::future::Future;
use std::sync::Arc; use std::sync::Arc;
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};
use storage::log_store::log_manager::sector_to_segment;
use storage::log_store::{tx_store::BlockHashAndSubmissionIndex, Store}; use storage::log_store::{tx_store::BlockHashAndSubmissionIndex, Store};
use task_executor::{ShutdownReason, TaskExecutor}; use task_executor::{ShutdownReason, TaskExecutor};
use thiserror::Error; use thiserror::Error;
@ -481,7 +481,9 @@ impl LogSyncManager {
} else { } else {
let store = self.store.clone(); let store = self.store.clone();
let shard_config = store.flow().get_shard_config(); let shard_config = store.flow().get_shard_config();
if sector_to_segment(bytes_to_chunks(tx.size as usize) as u64) < shard_config.shard_id { if sector_to_segment(bytes_to_chunks(tx.size as usize) as u64)
< shard_config.shard_id
{
if let Err(e) = store.finalize_tx_with_hash(tx.seq, tx.hash()) { if let Err(e) = store.finalize_tx_with_hash(tx.seq, tx.hash()) {
error!("finalize file that does not need to store: e={:?}", e); error!("finalize file that does not need to store: e={:?}", e);
return false; return false;