Add admin_(add|remove)TrustedPeer on admin rpc (#678)

This commit is contained in:
Aurélien
2023-01-02 12:15:50 +01:00
committed by GitHub
parent 05cb56788d
commit e73b0019fa

View File

@@ -14,6 +14,17 @@ pub trait AdminApi {
#[method(name = "admin_removePeer")]
async fn remove_peer(&self, record: String) -> Result<bool>;
/// Adds the given node record to the trusted peerset.
#[method(name = "admin_addTrustedPeer")]
async fn add_trusted_peer(&self, record: String) -> Result<bool>;
/// Removes a remote node from the trusted peer set, but it does not disconnect it
/// automatically.
///
/// Returns true if the peer was successfully removed.
#[method(name = "admin_removeTrustedPeer")]
async fn remove_trusted_peer(&self, record: String) -> Result<bool>;
/// Creates an RPC subscription which serves events received from the network.
#[subscription(
name = "admin_peerEvents",