mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Offchain execution extensions (#4145)
* Pass Extensions instead of individual objects. * Move TransactionPool to a separate ExternalitiesExtension. * Fix compilation.? * Clean up. * Refactor testing utilities. * Add docs, fix tests. * Fix doctest. * Fix formatting and add some logs. * Add some docs. * Remove unused files.
This commit is contained in:
committed by
Gavin Wood
parent
f000392cc0
commit
86b6ac5571
@@ -19,12 +19,12 @@ mod sandbox;
|
||||
use codec::{Encode, Decode};
|
||||
use hex_literal::hex;
|
||||
use primitives::{
|
||||
Blake2Hasher, blake2_128, blake2_256, ed25519, sr25519, map, Pair, offchain::OffchainExt,
|
||||
Blake2Hasher, blake2_128, blake2_256, ed25519, sr25519, map, Pair,
|
||||
offchain::{OffchainExt, testing},
|
||||
traits::Externalities,
|
||||
};
|
||||
use runtime_test::WASM_BINARY;
|
||||
use state_machine::TestExternalities as CoreTestExternalities;
|
||||
use substrate_offchain::testing;
|
||||
use test_case::test_case;
|
||||
use trie::{TrieConfiguration, trie_types::Layout};
|
||||
|
||||
@@ -401,7 +401,7 @@ fn ordered_trie_root_should_work(wasm_method: WasmExecutionMethod) {
|
||||
#[test_case(WasmExecutionMethod::Interpreted)]
|
||||
#[cfg_attr(feature = "wasmtime", test_case(WasmExecutionMethod::Compiled))]
|
||||
fn offchain_local_storage_should_work(wasm_method: WasmExecutionMethod) {
|
||||
use client_api::OffchainStorage;
|
||||
use primitives::offchain::OffchainStorage;
|
||||
|
||||
let mut ext = TestExternalities::default();
|
||||
let (offchain, state) = testing::TestOffchainExt::new();
|
||||
|
||||
Reference in New Issue
Block a user