Skip to content

Commit 417e88d

Browse files
committed
Fix lints
Signed-off-by: Danil <[email protected]>
1 parent 79e8c3f commit 417e88d

File tree

10 files changed

+169
-57
lines changed

10 files changed

+169
-57
lines changed

core/lib/config/src/configs/snapshot_recovery.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ mod tests {
8787
max_retries: 100,
8888
local_mirror_path: None,
8989
}),
90+
recover_from_l1: false,
9091
}
9192
}
9293

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/node/l1_recovery/src/l1_fetcher/fetcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use tokio::{
1212
use zksync_basic_types::{
1313
bytecode::BytecodeHash,
1414
protocol_version::{L1VerifierConfig, ProtocolSemanticVersion},
15-
web3::{contract::Tokenizable, BlockId, BlockNumber, FilterBuilder, Log, Transaction},
15+
web3::{BlockId, BlockNumber, FilterBuilder, Log, Transaction},
1616
Address, L1BatchNumber, PriorityOpId, H256, U256, U64,
1717
};
1818
use zksync_contracts::{hyperchain_contract, BaseSystemContractsHashes};

core/node/l1_recovery/src/l1_fetcher/types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ impl CommitBlock {
116116
Ok(Self::from_commit_block(commit_block_info.to_enum_variant()))
117117
}
118118

119-
pub async fn try_from_token_resolve<'a>(
120-
value: &'a ethabi::Token,
119+
pub async fn try_from_token_resolve(
120+
value: &ethabi::Token,
121121
client: &Arc<dyn BlobClient>,
122122
) -> Result<Self, ParseError> {
123123
let commit_block_info = V3::try_from(value)?;

core/node/l1_recovery/src/processor/db_recovery.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
use std::{default::Default, fs, path::PathBuf, sync::Arc};
22

3-
use chrono::DateTime;
43
use tempfile::TempDir;
54
use tokio::sync::watch;
65
use zksync_basic_types::{Address, L1BatchNumber, L2BlockNumber, H256, U256};
76
use zksync_dal::{eth_watcher_dal::EventType, ConnectionPool, Core, CoreDal};
87
use zksync_eth_client::EthInterface;
98
use zksync_object_store::ObjectStore;
109
use zksync_types::{
11-
aggregated_operations::{AggregatedActionType, L1BatchAggregatedActionType},
10+
aggregated_operations::L1BatchAggregatedActionType,
1211
block::{L1BatchHeader, L1BatchTreeData, L2BlockHasher, L2BlockHeader, UnsealedL1BatchHeader},
1312
commitment::{L1BatchCommitmentArtifacts, L1BatchCommitmentHash},
1413
eth_sender::EthTxFinalityStatus,

core/node/l1_recovery/src/processor/snapshot/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl StateCompressor {
6464
let mut result: Vec<SnapshotFactoryDependency> = get_genesis_factory_deps()
6565
.iter()
6666
.map(|dep| SnapshotFactoryDependency {
67-
hash: Some(BytecodeHash::for_bytecode(&dep).value()),
67+
hash: Some(BytecodeHash::for_bytecode(dep).value()),
6868
bytecode: dep.clone().into(),
6969
})
7070
.collect();

core/node/node_storage_init/src/node/external_node_strategy.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::{num::NonZeroUsize, sync::Arc};
22

33
use zksync_block_reverter::node::BlockReverterResource;
4-
use zksync_config::ContractsConfig;
54
use zksync_dal::node::{MasterPool, PoolResource};
65
use zksync_health_check::AppHealthCheck;
76
use zksync_l1_recovery::BlobClientResource;
@@ -10,7 +9,7 @@ use zksync_node_framework::{
109
FromContext,
1110
};
1211
use zksync_shared_resources::contracts::SettlementLayerContractsResource;
13-
use zksync_types::{Address, L2ChainId};
12+
use zksync_types::L2ChainId;
1413
use zksync_web3_decl::client::{DynClient, L1, L2};
1514

1615
use crate::{

core/node/state_keeper/src/io/seal_logic/l2_block_seal_subtasks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ mod tests {
598598
};
599599

600600
// Run.
601-
let mut strategy = SealStrategy::Parallel(&pool);
601+
let mut strategy = SealStrategy::Parallel(Box::new(&pool));
602602
L2BlockSealProcess::run_subtasks(&l2_block_seal_command, &mut strategy)
603603
.await
604604
.unwrap();
@@ -625,7 +625,7 @@ mod tests {
625625
drop(connection);
626626

627627
// Run again.
628-
let mut strategy = SealStrategy::Parallel(&pool);
628+
let mut strategy = SealStrategy::Parallel(Box::new(&pool));
629629
L2BlockSealProcess::run_subtasks(&l2_block_seal_command, &mut strategy)
630630
.await
631631
.unwrap();

core/node/state_keeper/src/io/seal_logic/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl UpdatesManager {
6565
let transaction = connection.start_transaction().await?;
6666

6767
// We rely on the fact that fictive L2 block and L1 batch data is saved in the same transaction.
68-
let mut strategy = SealStrategy::Sequential(transaction);
68+
let mut strategy = SealStrategy::Sequential(Box::new(transaction));
6969
l2_block_command
7070
.seal_inner(&mut strategy, true)
7171
.await
@@ -291,8 +291,8 @@ impl UpdatesManager {
291291

292292
#[derive(Debug)]
293293
pub enum SealStrategy<'pool> {
294-
Sequential(Connection<'pool, Core>),
295-
Parallel(&'pool ConnectionPool<Core>),
294+
Sequential(Box<Connection<'pool, Core>>),
295+
Parallel(Box<&'pool ConnectionPool<Core>>),
296296
}
297297

298298
// As opposed to `Cow` from `std`; a union of an owned type and a mutable ref to it
@@ -333,7 +333,7 @@ impl<'pool> SealStrategy<'pool> {
333333
impl L2BlockSealCommand {
334334
pub(super) async fn seal(&self, pool: ConnectionPool<Core>) -> anyhow::Result<()> {
335335
let l2_block_number = self.l2_block.number;
336-
self.seal_inner(&mut SealStrategy::Parallel(&pool), false)
336+
self.seal_inner(&mut SealStrategy::Parallel(Box::new(&pool)), false)
337337
.await
338338
.with_context(|| format!("failed sealing L2 block #{l2_block_number}"))
339339
}

0 commit comments

Comments
 (0)