mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Expose that BasicQueue expects blocking spawn (#5860)
* Expose that `BasicQueue` expects blocking spawn Up to now `BasicQueue` expected a closure that to spawn a `Future`. This was expected to be a closure that spawns a blocking future. However, this wasn't documented anywhere. This pr introduces a new trait `SpawnBlocking` that exposes this requirement to the outside. * Feedback
This commit is contained in:
@@ -107,7 +107,7 @@ use sc_client_api::{
|
||||
};
|
||||
use sp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
|
||||
use futures::{prelude::*, future::BoxFuture};
|
||||
use futures::prelude::*;
|
||||
use log::{debug, info, log, trace, warn};
|
||||
use sc_consensus_slots::{
|
||||
SlotWorker, SlotInfo, SlotCompatible, StorageChanges, CheckedHeader, check_equivocation,
|
||||
@@ -1272,7 +1272,7 @@ pub fn import_queue<Block: BlockT, Client, Inner>(
|
||||
finality_proof_import: Option<BoxFinalityProofImport<Block>>,
|
||||
client: Arc<Client>,
|
||||
inherent_data_providers: InherentDataProviders,
|
||||
spawner: impl Fn(BoxFuture<'static, ()>) -> (),
|
||||
spawner: &impl sp_core::traits::SpawnBlocking,
|
||||
) -> ClientResult<BabeImportQueue<Block, sp_api::TransactionFor<Client, Block>>> where
|
||||
Inner: BlockImport<Block, Error = ConsensusError, Transaction = sp_api::TransactionFor<Client, Block>>
|
||||
+ Send + Sync + 'static,
|
||||
|
||||
Reference in New Issue
Block a user