mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +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:
@@ -23,14 +23,17 @@ use std::{
|
||||
};
|
||||
|
||||
use codec::{Encode, Decode};
|
||||
use sp_core::{convert_hash, NativeOrEncoded, traits::CodeExecutor, offchain::storage::OffchainOverlayedChanges};
|
||||
use sp_core::{
|
||||
convert_hash, NativeOrEncoded, traits::{CodeExecutor, SpawnNamed},
|
||||
offchain::storage::OffchainOverlayedChanges,
|
||||
};
|
||||
use sp_runtime::{
|
||||
generic::BlockId, traits::{One, Block as BlockT, Header as HeaderT, HashFor},
|
||||
};
|
||||
use sp_externalities::Extensions;
|
||||
use sp_state_machine::{
|
||||
self, Backend as StateBackend, OverlayedChanges, ExecutionStrategy, create_proof_check_backend,
|
||||
execution_proof_check_on_trie_backend, ExecutionManager, StorageProof, CloneableSpawn,
|
||||
execution_proof_check_on_trie_backend, ExecutionManager, StorageProof,
|
||||
};
|
||||
use hash_db::Hasher;
|
||||
|
||||
@@ -220,7 +223,7 @@ pub fn prove_execution<Block, S, E>(
|
||||
/// Proof should include both environment preparation proof and method execution proof.
|
||||
pub fn check_execution_proof<Header, E, H>(
|
||||
executor: &E,
|
||||
spawn_handle: Box<dyn CloneableSpawn>,
|
||||
spawn_handle: Box<dyn SpawnNamed>,
|
||||
request: &RemoteCallRequest<Header>,
|
||||
remote_proof: StorageProof,
|
||||
) -> ClientResult<Vec<u8>>
|
||||
@@ -251,7 +254,7 @@ pub fn check_execution_proof<Header, E, H>(
|
||||
/// Proof should include both environment preparation proof and method execution proof.
|
||||
pub fn check_execution_proof_with_make_header<Header, E, H, MakeNextHeader>(
|
||||
executor: &E,
|
||||
spawn_handle: Box<dyn CloneableSpawn>,
|
||||
spawn_handle: Box<dyn SpawnNamed>,
|
||||
request: &RemoteCallRequest<Header>,
|
||||
remote_proof: StorageProof,
|
||||
make_next_header: MakeNextHeader,
|
||||
@@ -275,7 +278,7 @@ pub fn check_execution_proof_with_make_header<Header, E, H, MakeNextHeader>(
|
||||
let backend_runtime_code = sp_state_machine::backend::BackendRuntimeCode::new(&trie_backend);
|
||||
let runtime_code = backend_runtime_code.runtime_code()?;
|
||||
|
||||
execution_proof_check_on_trie_backend::<H, Header::Number, _>(
|
||||
execution_proof_check_on_trie_backend::<H, Header::Number, _, _>(
|
||||
&trie_backend,
|
||||
&mut changes,
|
||||
executor,
|
||||
@@ -286,7 +289,7 @@ pub fn check_execution_proof_with_make_header<Header, E, H, MakeNextHeader>(
|
||||
)?;
|
||||
|
||||
// execute method
|
||||
execution_proof_check_on_trie_backend::<H, Header::Number, _>(
|
||||
execution_proof_check_on_trie_backend::<H, Header::Number, _, _>(
|
||||
&trie_backend,
|
||||
&mut changes,
|
||||
executor,
|
||||
|
||||
Reference in New Issue
Block a user