mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 13:35:41 +00:00
Add trie migration rpc to polkadot-parachain (#1424)
* add trie migration rpc to polkadot-parachain * pass backend * fix
This commit is contained in:
@@ -42,8 +42,9 @@ pub struct FullDeps<C, P> {
|
||||
}
|
||||
|
||||
/// Instantiate all RPC extensions.
|
||||
pub fn create_full<C, P>(
|
||||
pub fn create_full<C, P, B>(
|
||||
deps: FullDeps<C, P>,
|
||||
backend: Arc<B>,
|
||||
) -> Result<RpcExtension, Box<dyn std::error::Error + Send + Sync>>
|
||||
where
|
||||
C: ProvideRuntimeApi<Block>
|
||||
@@ -57,15 +58,19 @@ where
|
||||
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
|
||||
C::Api: BlockBuilder<Block>,
|
||||
P: TransactionPool + Sync + Send + 'static,
|
||||
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
|
||||
B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,
|
||||
{
|
||||
use frame_rpc_system::{System, SystemApiServer};
|
||||
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
|
||||
use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer};
|
||||
|
||||
let mut module = RpcExtension::new(());
|
||||
let FullDeps { client, pool, deny_unsafe } = deps;
|
||||
|
||||
module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;
|
||||
module.merge(TransactionPayment::new(client).into_rpc())?;
|
||||
module.merge(TransactionPayment::new(client.clone()).into_rpc())?;
|
||||
module.merge(StateMigration::new(client.clone(), backend, deny_unsafe).into_rpc())?;
|
||||
|
||||
Ok(module)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user