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:
Qinxuan Chen
2022-05-21 14:13:09 +08:00
committed by GitHub
parent dcb8a8504e
commit 5497069d54
12 changed files with 72 additions and 83 deletions
@@ -122,21 +122,21 @@ pub trait StateMigrationApi<BlockHash> {
}
/// An implementation of state migration specific RPC methods.
pub struct MigrationRpc<C, B, BA> {
pub struct StateMigration<C, B, BA> {
client: Arc<C>,
backend: Arc<BA>,
deny_unsafe: DenyUnsafe,
_marker: std::marker::PhantomData<(B, BA)>,
}
impl<C, B, BA> MigrationRpc<C, B, BA> {
impl<C, B, BA> StateMigration<C, B, BA> {
/// Create new state migration rpc for the given reference to the client.
pub fn new(client: Arc<C>, backend: Arc<BA>, deny_unsafe: DenyUnsafe) -> Self {
MigrationRpc { client, backend, deny_unsafe, _marker: Default::default() }
StateMigration { client, backend, deny_unsafe, _marker: Default::default() }
}
}
impl<C, B, BA> StateMigrationApiServer<<B as BlockT>::Hash> for MigrationRpc<C, B, BA>
impl<C, B, BA> StateMigrationApiServer<<B as BlockT>::Hash> for StateMigration<C, B, BA>
where
B: BlockT,
C: Send + Sync + 'static + sc_client_api::HeaderBackend<B>,