Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kobayurii committed Dec 10, 2024
1 parent 70a0ed3 commit 85c29ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions rpc-server/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::string::ToString;

use futures::executor::block_on;
use near_lake_framework::FastNearClient;
use near_primitives::epoch_manager::{AllEpochConfig, EpochConfig};

use crate::modules::blocks::{BlocksInfoByFinality, CacheBlock};
Expand Down Expand Up @@ -32,10 +31,9 @@ impl GenesisInfo {
)
.await
.expect("Error to get genesis config");

let genesis_block =
near_lake_framework::fastnear::fetchers::fetch_first_block(fastnear_client)
.await;
near_lake_framework::fastnear::fetchers::fetch_first_block(fastnear_client).await;

Self {
genesis_config,
Expand Down Expand Up @@ -105,8 +103,11 @@ impl ServerContext {
"Referer".to_string(),
rpc_server_config.general.referer_header_value.clone(),
)?;

let fastnear_client = rpc_server_config.lake_config.lake_client(rpc_server_config.general.chain_id).await?;

let fastnear_client = rpc_server_config
.lake_config
.lake_client(rpc_server_config.general.chain_id)
.await?;

let blocks_info_by_finality = std::sync::Arc::new(
BlocksInfoByFinality::new(&near_rpc_client, &fastnear_client).await,
Expand Down
2 changes: 1 addition & 1 deletion rpc-server/src/modules/blocks/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ pub async fn fetch_chunk(
.map(|block_height_shard_id| (block_height_shard_id.0, block_height_shard_id.1))?,
};
let chunk_view =
fetch_chunk_from_fastnear(&data.fastnear_client, block_height, shard_id).await?;
fetch_chunk_from_fastnear(&data.fastnear_client, block_height, shard_id.into()).await?;
// increase block category metrics
crate::metrics::increase_request_category_metrics(
data,
Expand Down

0 comments on commit 85c29ae

Please sign in to comment.