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
@@ -51,14 +51,14 @@ pub trait TransactionPaymentApi<BlockHash, ResponseType> {
}
/// Provides RPC methods to query a dispatchable's class, weight and fee.
pub struct TransactionPaymentRpc<C, P> {
pub struct TransactionPayment<C, P> {
/// Shared reference to the client.
client: Arc<C>,
_marker: std::marker::PhantomData<P>,
}
impl<C, P> TransactionPaymentRpc<C, P> {
/// Creates a new instance of the TransactionPaymentRpc helper.
impl<C, P> TransactionPayment<C, P> {
/// Creates a new instance of the TransactionPayment Rpc helper.
pub fn new(client: Arc<C>) -> Self {
Self { client, _marker: Default::default() }
}
@@ -84,7 +84,7 @@ impl From<Error> for i32 {
#[async_trait]
impl<C, Block, Balance>
TransactionPaymentApiServer<<Block as BlockT>::Hash, RuntimeDispatchInfo<Balance>>
for TransactionPaymentRpc<C, Block>
for TransactionPayment<C, Block>
where
Block: BlockT,
C: ProvideRuntimeApi<Block> + HeaderBackend<Block> + Send + Sync + 'static,