mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 03:41:02 +00:00
Companion for removal of execution strategies (#7443)
* Companion for removal of execution strategies https://github.com/paritytech/substrate/pull/14387 * Fix some tests * 🤦 * Adapt to latest changes * Start supporting the offchain transaction pool * Fix tests * FMT * Remove patches * Update Substrate * update lockfile for {"substrate"} * Fix parachain upgrade smoke test * Fix test * Rewrite all tests to use `MockSubstemClient` --------- Co-authored-by: parity-processbot <>
This commit is contained in:
+13
-6
@@ -89,12 +89,13 @@ pub struct FullDeps<C, P, SC, B> {
|
||||
pub grandpa: GrandpaDeps<B>,
|
||||
/// BEEFY specific dependencies.
|
||||
pub beefy: BeefyDeps,
|
||||
/// Backend used by the node.
|
||||
pub backend: Arc<B>,
|
||||
}
|
||||
|
||||
/// Instantiate all RPC extensions.
|
||||
pub fn create_full<C, P, SC, B>(
|
||||
deps: FullDeps<C, P, SC, B>,
|
||||
backend: Arc<B>,
|
||||
FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa, beefy, backend } : FullDeps<C, P, SC, B>,
|
||||
) -> Result<RpcExtension, Box<dyn std::error::Error + Send + Sync>>
|
||||
where
|
||||
C: ProvideRuntimeApi<Block>
|
||||
@@ -124,8 +125,6 @@ where
|
||||
use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer};
|
||||
|
||||
let mut io = RpcModule::new(());
|
||||
let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa, beefy } =
|
||||
deps;
|
||||
let BabeDeps { babe_worker_handle, keystore } = babe;
|
||||
let GrandpaDeps {
|
||||
shared_voter_state,
|
||||
@@ -135,10 +134,18 @@ where
|
||||
finality_provider,
|
||||
} = grandpa;
|
||||
|
||||
io.merge(StateMigration::new(client.clone(), backend, deny_unsafe).into_rpc())?;
|
||||
io.merge(StateMigration::new(client.clone(), backend.clone(), deny_unsafe).into_rpc())?;
|
||||
io.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;
|
||||
io.merge(TransactionPayment::new(client.clone()).into_rpc())?;
|
||||
io.merge(Mmr::new(client.clone()).into_rpc())?;
|
||||
io.merge(
|
||||
Mmr::new(
|
||||
client.clone(),
|
||||
backend
|
||||
.offchain_storage()
|
||||
.ok_or("Backend doesn't provide the required offchain storage")?,
|
||||
)
|
||||
.into_rpc(),
|
||||
)?;
|
||||
io.merge(
|
||||
Babe::new(client.clone(), babe_worker_handle.clone(), keystore, select_chain, deny_unsafe)
|
||||
.into_rpc(),
|
||||
|
||||
Reference in New Issue
Block a user