mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Name all the tasks! (#6726)
* Remove any implementation of `Spawn` or `Executor` from our task executors * Fix compilation * Rename `SpawnBlockingExecutor` * Update primitives/core/src/traits.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Fix tests Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -358,7 +358,7 @@ mod tests {
|
||||
fn should_cease_building_block_when_deadline_is_reached() {
|
||||
// given
|
||||
let client = Arc::new(substrate_test_runtime_client::new());
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let spawner = sp_core::testing::TaskExecutor::new();
|
||||
let txpool = BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
@@ -412,7 +412,7 @@ mod tests {
|
||||
#[test]
|
||||
fn should_not_panic_when_deadline_is_reached() {
|
||||
let client = Arc::new(substrate_test_runtime_client::new());
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let spawner = sp_core::testing::TaskExecutor::new();
|
||||
let txpool = BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
@@ -448,7 +448,7 @@ mod tests {
|
||||
fn proposed_storage_changes_should_match_execute_block_storage_changes() {
|
||||
let (client, backend) = TestClientBuilder::new().build_with_backend();
|
||||
let client = Arc::new(client);
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let spawner = sp_core::testing::TaskExecutor::new();
|
||||
let txpool = BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
@@ -511,7 +511,7 @@ mod tests {
|
||||
fn should_not_remove_invalid_transactions_when_skipping() {
|
||||
// given
|
||||
let mut client = Arc::new(substrate_test_runtime_client::new());
|
||||
let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
let spawner = sp_core::testing::TaskExecutor::new();
|
||||
let txpool = BasicPool::new_full(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
//! # };
|
||||
//! # use sc_transaction_pool::{BasicPool, FullChainApi};
|
||||
//! # let client = Arc::new(substrate_test_runtime_client::new());
|
||||
//! # let spawner = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
//! # let spawner = sp_core::testing::TaskExecutor::new();
|
||||
//! # let txpool = BasicPool::new_full(
|
||||
//! # Default::default(),
|
||||
//! # Arc::new(FullChainApi::new(client.clone(), None)),
|
||||
|
||||
Reference in New Issue
Block a user