bad merge

This commit is contained in:
Andreas Bigger 2023-03-16 23:18:49 -04:00
parent 43850702c2
commit f679a7c5c8
4 changed files with 8 additions and 10 deletions

View File

@ -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]

View File

@ -242,7 +242,9 @@ impl<DB: Database> Client<DB> {
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,

View File

@ -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};

View File

@ -210,8 +210,6 @@ impl<R: ExecutionRpc> EthRpcServer for RpcInner<R> {
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<String, Error> {
@ -229,7 +227,6 @@ impl<R: ExecutionRpc> EthRpcServer for RpcInner<R> {
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<String, Error> {
@ -382,8 +379,6 @@ impl<R: ExecutionRpc> NetRpcServer for RpcInner<R> {
fn convert_err<T, E: Display>(res: Result<T, E>) -> Result<T, Error> {
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