mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 13:31:10 +00:00
Unify rpc api and implementation name (#11469)
* Unify rpc api and implementation name Signed-off-by: koushiro <koushiro.cqx@gmail.com> * MauanlSeal ==> ManualSealRpc Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove extra Rpc naming in the structs Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Update doc Signed-off-by: koushiro <koushiro.cqx@gmail.com> * fix merge Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
//! ```
|
||||
//!
|
||||
//! If the [`LightSyncStateExtension`] is not added as an extension to the chain spec,
|
||||
//! the [`SyncStateRpc`] will fail at instantiation.
|
||||
//! the [`SyncState`] will fail at instantiation.
|
||||
|
||||
#![deny(unused_crate_dependencies)]
|
||||
|
||||
@@ -125,21 +125,21 @@ pub struct LightSyncState<Block: BlockT> {
|
||||
|
||||
/// An api for sync state RPC calls.
|
||||
#[rpc(client, server)]
|
||||
pub trait SyncStateRpcApi {
|
||||
pub trait SyncStateApi {
|
||||
/// Returns the JSON serialized chainspec running the node, with a sync state.
|
||||
#[method(name = "sync_state_genSyncSpec")]
|
||||
fn system_gen_sync_spec(&self, raw: bool) -> RpcResult<serde_json::Value>;
|
||||
}
|
||||
|
||||
/// An api for sync state RPC calls.
|
||||
pub struct SyncStateRpc<Block: BlockT, Client> {
|
||||
pub struct SyncState<Block: BlockT, Client> {
|
||||
chain_spec: Box<dyn sc_chain_spec::ChainSpec>,
|
||||
client: Arc<Client>,
|
||||
shared_authority_set: SharedAuthoritySet<Block>,
|
||||
shared_epoch_changes: SharedEpochChanges<Block>,
|
||||
}
|
||||
|
||||
impl<Block, Client> SyncStateRpc<Block, Client>
|
||||
impl<Block, Client> SyncState<Block, Client>
|
||||
where
|
||||
Block: BlockT,
|
||||
Client: HeaderBackend<Block> + sc_client_api::AuxStore + 'static,
|
||||
@@ -180,7 +180,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<Block, Backend> SyncStateRpcApiServer for SyncStateRpc<Block, Backend>
|
||||
impl<Block, Backend> SyncStateApiServer for SyncState<Block, Backend>
|
||||
where
|
||||
Block: BlockT,
|
||||
Backend: HeaderBackend<Block> + sc_client_api::AuxStore + 'static,
|
||||
|
||||
Reference in New Issue
Block a user