mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: update authmodule new with new engine trait (#14206)
This commit is contained in:
@ -6,7 +6,6 @@ use jsonrpsee::{
|
||||
server::{AlreadyStoppedError, RpcModule},
|
||||
Methods,
|
||||
};
|
||||
use reth_engine_primitives::EngineTypes;
|
||||
use reth_rpc_api::servers::*;
|
||||
use reth_rpc_eth_types::EthSubscriptionIdProvider;
|
||||
use reth_rpc_layer::{
|
||||
@ -189,18 +188,10 @@ pub struct AuthRpcModule {
|
||||
pub(crate) inner: RpcModule<()>,
|
||||
}
|
||||
|
||||
// === impl AuthRpcModule ===
|
||||
|
||||
impl AuthRpcModule {
|
||||
/// Create a new `AuthRpcModule` with the given `engine_api`.
|
||||
pub fn new<EngineApi, EngineT>(engine: EngineApi) -> Self
|
||||
where
|
||||
EngineT: EngineTypes,
|
||||
EngineApi: EngineApiServer<EngineT>,
|
||||
{
|
||||
let mut module = RpcModule::new(());
|
||||
module.merge(engine.into_rpc()).expect("No conflicting methods");
|
||||
Self { inner: module }
|
||||
pub fn new(engine: impl IntoEngineApiRpcModule) -> Self {
|
||||
Self { inner: engine.into_rpc_module() }
|
||||
}
|
||||
|
||||
/// Get a reference to the inner `RpcModule`.
|
||||
|
||||
Reference in New Issue
Block a user