mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 19:45:41 +00:00
Update to Substrate master (#311)
* Best effort to bring up to date. * Fix the executor stuff * Update verisons. * Finish fixing * Final fixes and warnings. * add some docs and bump Wasm versions * Fix tests * Fix final test
This commit is contained in:
@@ -26,7 +26,6 @@ use polkadot_primitives::{parachain, Block, Hash, BlockId};
|
||||
use polkadot_runtime::{GenesisConfig, RuntimeApi};
|
||||
use polkadot_network::gossip::{self as network_gossip, Known};
|
||||
use primitives::{ed25519, Pair};
|
||||
use tokio::runtime::TaskExecutor;
|
||||
use service::{FactoryFullConfiguration, FullBackend, LightBackend, FullExecutor, LightExecutor};
|
||||
use transaction_pool::txpool::{Pool as TransactionPool};
|
||||
use aura::{import_queue, start_aura, AuraImportQueue, SlotDuration};
|
||||
@@ -161,10 +160,10 @@ service::construct_service_factory! {
|
||||
Genesis = GenesisConfig,
|
||||
Configuration = CustomConfiguration,
|
||||
FullService = FullComponents<Self>
|
||||
{ |config: FactoryFullConfiguration<Self>, executor: TaskExecutor| {
|
||||
FullComponents::<Factory>::new(config, executor)
|
||||
{ |config: FactoryFullConfiguration<Self>| {
|
||||
FullComponents::<Factory>::new(config)
|
||||
} },
|
||||
AuthoritySetup = { |mut service: Self::FullService, executor: TaskExecutor, key: Option<Arc<ed25519::Pair>>| {
|
||||
AuthoritySetup = { |mut service: Self::FullService, key: Option<Arc<ed25519::Pair>>| {
|
||||
use polkadot_network::validation::ValidationNetwork;
|
||||
|
||||
let (block_import, link_half) = service.config.custom.grandpa_import_setup.take()
|
||||
@@ -188,7 +187,7 @@ service::construct_service_factory! {
|
||||
|
||||
match config.local_key {
|
||||
None => {
|
||||
executor.spawn(grandpa::run_grandpa_observer(
|
||||
service.spawn_task(grandpa::run_grandpa_observer(
|
||||
config,
|
||||
link_half,
|
||||
service.network(),
|
||||
@@ -199,9 +198,7 @@ service::construct_service_factory! {
|
||||
use service::TelemetryOnConnect;
|
||||
|
||||
let telemetry_on_connect = TelemetryOnConnect {
|
||||
on_exit: Box::new(service.on_exit()),
|
||||
telemetry_connection_sinks: service.telemetry_on_connect_stream(),
|
||||
executor: &executor,
|
||||
};
|
||||
|
||||
let grandpa_config = grandpa::GrandpaParams {
|
||||
@@ -212,7 +209,7 @@ service::construct_service_factory! {
|
||||
on_exit: service.on_exit(),
|
||||
telemetry_on_connect: Some(telemetry_on_connect),
|
||||
};
|
||||
executor.spawn(grandpa::run_grandpa_voter(grandpa_config)?);
|
||||
service.spawn_task(grandpa::run_grandpa_voter(grandpa_config)?);
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -280,7 +277,7 @@ service::construct_service_factory! {
|
||||
service.on_exit(),
|
||||
gossip_validator,
|
||||
service.client(),
|
||||
executor.clone(),
|
||||
polkadot_network::validation::WrappedExecutor(service.spawn_task_handle()),
|
||||
);
|
||||
let proposer_factory = ::consensus::ProposerFactory::new(
|
||||
client.clone(),
|
||||
@@ -288,7 +285,7 @@ service::construct_service_factory! {
|
||||
validation_network.clone(),
|
||||
validation_network,
|
||||
service.transaction_pool(),
|
||||
executor.clone(),
|
||||
Arc::new(service.spawn_task_handle()),
|
||||
key.clone(),
|
||||
extrinsic_store,
|
||||
SlotDuration::get_or_compute(&*client)?,
|
||||
@@ -308,11 +305,11 @@ service::construct_service_factory! {
|
||||
service.config.force_authoring,
|
||||
)?;
|
||||
|
||||
executor.spawn(task);
|
||||
service.spawn_task(task);
|
||||
Ok(service)
|
||||
}},
|
||||
LightService = LightComponents<Self>
|
||||
{ |config, executor| <LightComponents<Factory>>::new(config, executor) },
|
||||
{ |config| <LightComponents<Factory>>::new(config) },
|
||||
FullImportQueue = AuraImportQueue<
|
||||
Self::Block,
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user