mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 23:21:02 +00:00
[big refactor] Remove crate aliasing. (#4395)
* Rename: Phase 1. * Unify codec. * Fixing: Phase 2 * Fixing: Phase 3. * Fixing: Phase 4. * Fixing: Phase 5. * Fixing: Phase 6. * Fixing: Phase 7. * Fixing: Phase 8. Tests * Fixing: Phase 9. Tests!!! * Fixing: Phase 10. Moar tests! * Finally done! * More fixes. * Rename primitives:: to sp_core:: * Apply renames in finality-grandpa. * Fix benches. * Fix benches 2. * Revert node-template. * Fix frame-system in our modules.
This commit is contained in:
committed by
Gavin Wood
parent
f14d98a439
commit
8778ca7dc8
@@ -23,14 +23,14 @@ use wasmi::{
|
||||
};
|
||||
use crate::error::{Error, WasmError};
|
||||
use codec::{Encode, Decode};
|
||||
use primitives::{sandbox as sandbox_primitives, traits::Externalities};
|
||||
use sp_core::{sandbox as sandbox_primitives, traits::Externalities};
|
||||
use crate::sandbox;
|
||||
use crate::allocator;
|
||||
use crate::wasm_utils::interpret_runtime_api_result;
|
||||
use crate::wasm_runtime::WasmRuntime;
|
||||
use log::{error, trace};
|
||||
use parity_wasm::elements::{deserialize_buffer, DataSegment, Instruction, Module as RawModule};
|
||||
use wasm_interface::{
|
||||
use sp_wasm_interface::{
|
||||
FunctionContext, Pointer, WordSize, Sandbox, MemoryId, Result as WResult, Function,
|
||||
};
|
||||
|
||||
@@ -273,7 +273,7 @@ impl<'a> wasmi::ModuleImportResolver for Resolver<'a> {
|
||||
fn resolve_func(&self, name: &str, signature: &wasmi::Signature)
|
||||
-> std::result::Result<wasmi::FuncRef, wasmi::Error>
|
||||
{
|
||||
let signature = wasm_interface::Signature::from(signature);
|
||||
let signature = sp_wasm_interface::Signature::from(signature);
|
||||
for (function_index, function) in self.0.iter().enumerate() {
|
||||
if name == function.name() {
|
||||
if signature == function.signature() {
|
||||
@@ -364,7 +364,7 @@ fn call_in_wasm_module(
|
||||
let offset = fec.allocate_memory(data.len() as u32)?;
|
||||
fec.write_memory(offset, data)?;
|
||||
|
||||
let result = externalities::set_and_run_with_externalities(
|
||||
let result = sp_externalities::set_and_run_with_externalities(
|
||||
ext,
|
||||
|| module_instance.invoke_export(
|
||||
method,
|
||||
|
||||
Reference in New Issue
Block a user