diff --git a/cli/src/main.rs b/cli/src/main.rs index f516a26..9597f65 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -5,15 +5,15 @@ use std::{ sync::{Arc, Mutex}, }; -use eyre::Result; use clap::Parser; use dirs::home_dir; use env_logger::Env; +use eyre::Result; use futures::executor::block_on; use log::{error, info}; -use common::utils::hex_str_to_bytes; use client::{database::FileDB, Client, ClientBuilder}; +use common::utils::hex_str_to_bytes; use config::{CliConfig, Config}; #[tokio::main] diff --git a/client/src/client.rs b/client/src/client.rs index 56d44ff..68e5140 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -242,7 +242,9 @@ impl Client { let node = Arc::new(RwLock::new(node)); #[cfg(not(target_arch = "wasm32"))] - let rpc = config.rpc_port.map(|port| Rpc::new(node.clone(), config.with_http, config.with_ws, port)); + let rpc = config + .rpc_port + .map(|port| Rpc::new(node.clone(), config.with_http, config.with_ws, port)); Ok(Client { node, diff --git a/client/src/node.rs b/client/src/node.rs index bceb63d..ff837c0 100644 --- a/client/src/node.rs +++ b/client/src/node.rs @@ -4,7 +4,9 @@ use std::time::Duration; use ethers::prelude::{Address, U256}; -use ethers::types::{FeeHistory, Filter, Log, SyncProgress, SyncingStatus, Transaction, TransactionReceipt, H256}; +use ethers::types::{ + FeeHistory, Filter, Log, SyncProgress, SyncingStatus, Transaction, TransactionReceipt, H256, +}; use execution::rpc::{ExecutionRpc, WsRpc}; use eyre::{eyre, Result}; diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 5a3b1d6..3ba9d2b 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -210,8 +210,6 @@ impl EthRpcServer for RpcInner { let nonce = convert_err(node.get_nonce(&address, block).await)?; Ok(format!("0x{nonce:x}")) -<<<<<<< HEAD -======= } async fn get_block_transaction_count_by_hash(&self, hash: &str) -> Result { @@ -229,7 +227,6 @@ impl EthRpcServer for RpcInner { let node = self.node.read().await; let transaction_count = convert_err(node.get_block_transaction_count_by_number(block))?; Ok(u64_to_hex_string(transaction_count)) ->>>>>>> master } async fn get_code(&self, address: &str, block: BlockTag) -> Result { @@ -382,8 +379,6 @@ impl NetRpcServer for RpcInner { fn convert_err(res: Result) -> Result { res.map_err(|err| Error::Custom(err.to_string())) } -<<<<<<< HEAD -======= fn format_hex(num: &U256) -> String { let stripped = num @@ -401,4 +396,3 @@ fn format_hex(num: &U256) -> String { format!("0x{stripped}") } ->>>>>>> master