mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +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:
@@ -1206,9 +1206,10 @@ pub type SubstrateHostFunctions = (
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use sp_core::map;
|
||||
use sp_state_machine::BasicExternalities;
|
||||
use sp_core::storage::Storage;
|
||||
use sp_core::{
|
||||
storage::Storage, map, traits::TaskExecutorExt, testing::TaskExecutor,
|
||||
};
|
||||
use std::any::TypeId;
|
||||
|
||||
#[test]
|
||||
@@ -1274,7 +1275,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn batch_verify_start_finish_works() {
|
||||
let mut ext = BasicExternalities::with_tasks_executor();
|
||||
let mut ext = BasicExternalities::default();
|
||||
ext.register_extension(TaskExecutorExt::new(TaskExecutor::new()));
|
||||
|
||||
ext.execute_with(|| {
|
||||
crypto::start_batch_verify();
|
||||
});
|
||||
@@ -1290,7 +1293,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn long_sr25519_batching() {
|
||||
let mut ext = BasicExternalities::with_tasks_executor();
|
||||
let mut ext = BasicExternalities::default();
|
||||
ext.register_extension(TaskExecutorExt::new(TaskExecutor::new()));
|
||||
ext.execute_with(|| {
|
||||
let pair = sr25519::Pair::generate_with_phrase(None).0;
|
||||
crypto::start_batch_verify();
|
||||
@@ -1320,7 +1324,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn batching_works() {
|
||||
let mut ext = BasicExternalities::with_tasks_executor();
|
||||
let mut ext = BasicExternalities::default();
|
||||
ext.register_extension(TaskExecutorExt::new(TaskExecutor::new()));
|
||||
ext.execute_with(|| {
|
||||
// invalid ed25519 signature
|
||||
crypto::start_batch_verify();
|
||||
|
||||
Reference in New Issue
Block a user