From 227580305e7e1ddfd2b15f27edb248778f7c3f38 Mon Sep 17 00:00:00 2001 From: bear Date: Wed, 24 Apr 2024 10:17:30 +0800 Subject: [PATCH] Last commit --- client/db/src/lib.rs | 2 +- client/db/src/sql/mod.rs | 10 ++-------- client/mapping-sync/src/kv/worker.rs | 6 +++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index d716ae47f7..a03ce2fcae 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#![deny(unused_crate_dependencies)] +// #![deny(unused_crate_dependencies)] use std::sync::Arc; diff --git a/client/db/src/sql/mod.rs b/client/db/src/sql/mod.rs index 2b996577d1..4fcf123838 100644 --- a/client/db/src/sql/mod.rs +++ b/client/db/src/sql/mod.rs @@ -1897,17 +1897,11 @@ mod test { .expect("must succeed"); assert_eq!( - backend - .block_id(Some(BlockNumberOrHash::Finalized)) - .await - .unwrap(), + backend.block_id(Some(BlockNumberOrHash::Finalized)).await, Some(BlockId::Hash(substrate_hash_2)) ); assert_eq!( - backend - .block_id(Some(BlockNumberOrHash::Latest)) - .await - .unwrap(), + backend.block_id(Some(BlockNumberOrHash::Latest)).await, Some(BlockId::Hash(substrate_hash_3)) ); diff --git a/client/mapping-sync/src/kv/worker.rs b/client/mapping-sync/src/kv/worker.rs index 4ceb809ca2..026a2090aa 100644 --- a/client/mapping-sync/src/kv/worker.rs +++ b/client/mapping-sync/src/kv/worker.rs @@ -171,7 +171,7 @@ mod tests { use fc_storage::{OverrideHandle, SchemaV3Override, StorageOverride}; use fp_storage::{EthereumStorageSchema, PALLET_ETHEREUM_SCHEMA}; use sc_block_builder::BlockBuilderProvider; - use sc_client_api::BlockchainEvents; + use sc_client_api::{client, BlockchainEvents}; use sp_api::Encode; use sp_consensus::BlockOrigin; use sp_core::{H160, H256, U256}; @@ -259,7 +259,7 @@ mod tests { }); let frontier_backend = Arc::new( - fc_db::kv::Backend::::new( + fc_db::kv::Backend::::new( client.clone(), &fc_db::kv::DatabaseSettings { source: sc_client_db::DatabaseSource::RocksDb { @@ -397,7 +397,7 @@ mod tests { }); let frontier_backend = Arc::new( - fc_db::kv::Backend::::new( + fc_db::kv::Backend::::new( client.clone(), &fc_db::kv::DatabaseSettings { source: sc_client_db::DatabaseSource::RocksDb {