mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Update the service to std futures (#4447)
* Switch service to futures03 * Fix tests * Fix service test and cli * Re-add Executor trait to SpawnTaskHandle * Fix node-service * Update babe * Fix browser node * Update aura * Revert back to tokio-executor to fix runtime panic * Add todo item * Fix service tests again * Timeout test futures * Fix tests * nits * Fix service test * Remove zstd patch * Re-add futures01 to aura and babe tests as a dev-dep * Change failing test to tee * Fix node * Upgrade tokio * fix society * Start switching grandpa to stable futures * Revert "Start switching grandpa to stable futures" This reverts commit 9c1976346237637effc07c13f7d0403daf5e71cf. * Fix utils * Revert substrate service test * Revert gitlab Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -153,7 +153,7 @@ pub fn start_aura<B, C, SC, E, I, P, SO, CAW, Error>(
|
||||
force_authoring: bool,
|
||||
keystore: KeyStorePtr,
|
||||
can_author_with: CAW,
|
||||
) -> Result<impl futures01::Future<Item = (), Error = ()>, sp_consensus::Error> where
|
||||
) -> Result<impl Future<Output = ()>, sp_consensus::Error> where
|
||||
B: BlockT,
|
||||
C: ProvideRuntimeApi<B> + BlockOf + ProvideCache<B> + AuxStore + Send + Sync,
|
||||
C::Api: AuraApi<B, AuthorityId<P>>,
|
||||
@@ -189,7 +189,7 @@ pub fn start_aura<B, C, SC, E, I, P, SO, CAW, Error>(
|
||||
inherent_data_providers,
|
||||
AuraSlotCompatible,
|
||||
can_author_with,
|
||||
).map(|()| Ok::<(), ()>(())).compat())
|
||||
))
|
||||
}
|
||||
|
||||
struct AuraWorker<C, E, I, P, SO> {
|
||||
@@ -1019,7 +1019,10 @@ mod tests {
|
||||
false,
|
||||
keystore,
|
||||
sp_consensus::AlwaysCanAuthor,
|
||||
).expect("Starts aura");
|
||||
)
|
||||
.expect("Starts aura")
|
||||
.unit_error()
|
||||
.compat();
|
||||
|
||||
runtime.spawn(aura);
|
||||
}
|
||||
@@ -1030,7 +1033,7 @@ mod tests {
|
||||
}));
|
||||
|
||||
runtime.block_on(future::join_all(import_notifications)
|
||||
.map(|_| Ok::<(), ()>(())).compat()).unwrap();
|
||||
.unit_error().compat()).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user