chore(rpc): replace todo! with unimplemented error response (#2026)

This commit is contained in:
Matthias Seitz
2023-03-29 15:05:19 +02:00
committed by GitHub
parent 47b9738ede
commit b11a7e4c25

View File

@ -1,4 +1,4 @@
use crate::result::ToRpcResult;
use crate::result::{internal_rpc_err, ToRpcResult};
use async_trait::async_trait;
use jsonrpsee::core::RpcResult;
use reth_network_api::{NetworkInfo, PeerKind, Peers};
@ -53,9 +53,10 @@ where
/// Handler for `admin_peerEvents`
fn subscribe_peer_events(
&self,
_subscription_sink: jsonrpsee::SubscriptionSink,
sink: jsonrpsee::SubscriptionSink,
) -> jsonrpsee::types::SubscriptionResult {
todo!()
sink.close(internal_rpc_err("admin_peerEvents is not implemented yet"));
Ok(())
}
/// Handler for `admin_nodeInfo`