Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kobayurii committed Oct 8, 2024
1 parent 9f9e96a commit 96895d2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions rpc-server/src/modules/blocks/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use near_primitives::views::StateChangeValueView;

use crate::config::ServerContext;
use crate::modules::blocks::utils::{
check_block_height, fetch_block_from_cache_or_get, fetch_chunk_from_fastnear, is_matching_change,
check_block_height, fetch_block_from_cache_or_get, fetch_chunk_from_fastnear,
is_matching_change,
};

/// `block` rpc method implementation
Expand Down Expand Up @@ -363,13 +364,13 @@ pub async fn fetch_block(
&data.fastnear_client,
block_height,
)
.await
.map_err(|err| {
tracing::error!("Failed to fetch block from fastnear: {}", err);
near_jsonrpc::primitives::types::blocks::RpcBlockError::UnknownBlock {
error_message: format!("BLOCK HEIGHT: {:?}", block_height),
}
})?
.await
.map_err(|err| {
tracing::error!("Failed to fetch block from fastnear: {}", err);
near_jsonrpc::primitives::types::blocks::RpcBlockError::UnknownBlock {
error_message: format!("BLOCK HEIGHT: {:?}", block_height),
}
})?
};
Ok(near_jsonrpc::primitives::types::blocks::RpcBlockResponse { block_view })
}
Expand Down

0 comments on commit 96895d2

Please sign in to comment.