mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(rpc): EthApiTypes trait for network specific error AT (#9523)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user