chore(rpc): EthApiTypes trait for network specific error AT (#9523)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Emilia Hane
2024-07-25 19:30:30 +02:00
committed by GitHub
parent f175f6ec9f
commit 0be2c17a9f
39 changed files with 878 additions and 478 deletions

View File

@ -2,12 +2,9 @@ use alloy_consensus::TxEnvelope;
use alloy_network::eip2718::Decodable2718;
use reth::{
builder::{rpc::RpcRegistry, FullNodeComponents},
rpc::{
api::{
eth::helpers::{EthApiSpec, EthTransactions, TraceExt},
DebugApiServer,
},
server_types::eth::EthResult,
rpc::api::{
eth::helpers::{EthApiSpec, EthTransactions, TraceExt},
DebugApiServer,
},
};
use reth_primitives::{Bytes, B256};
@ -21,7 +18,7 @@ where
EthApi: EthApiSpec + EthTransactions + TraceExt,
{
/// Injects a raw transaction into the node tx pool via RPC server
pub async fn inject_tx(&mut self, raw_tx: Bytes) -> EthResult<B256> {
pub async fn inject_tx(&mut self, raw_tx: Bytes) -> Result<B256, EthApi::Error> {
let eth_api = self.inner.eth_api();
eth_api.send_raw_transaction(raw_tx).await
}