mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
Instantiate environment with asynchronous API (#768)
* point to in-progress Substrate branch * instantiate environment async * Fix futures * Bump runtime * Fix collation tests * point to polkadot-master again * point to polkadot-master again * update deps Co-authored-by: Ashley <ashley.ruglys@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9c59e8a271
commit
a5d9645bf4
@@ -18,7 +18,11 @@
|
||||
|
||||
pub mod chain_spec;
|
||||
|
||||
use futures::{FutureExt, TryFutureExt, task::{Spawn, SpawnError, FutureObj}};
|
||||
use futures::{
|
||||
FutureExt, TryFutureExt,
|
||||
task::{Spawn, SpawnError, FutureObj},
|
||||
compat::Future01CompatExt,
|
||||
};
|
||||
use sc_client::LongestChain;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
@@ -455,9 +459,7 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(config: Configuration)
|
||||
service.keystore(),
|
||||
dht_event_stream,
|
||||
);
|
||||
let future01_authority_discovery = authority_discovery.map(|x| Ok(x)).compat();
|
||||
|
||||
service.spawn_task(future01_authority_discovery);
|
||||
service.spawn_task(authority_discovery);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,7 +500,9 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(config: Configuration)
|
||||
executor: service.spawn_task_handle(),
|
||||
};
|
||||
|
||||
service.spawn_essential_task(grandpa::run_grandpa_voter(grandpa_config)?);
|
||||
service.spawn_essential_task(
|
||||
grandpa::run_grandpa_voter(grandpa_config)?.compat().map(drop)
|
||||
);
|
||||
} else {
|
||||
grandpa::setup_disabled_grandpa(
|
||||
service.client(),
|
||||
|
||||
Reference in New Issue
Block a user