mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
Switch from pwasm-utils to wasm-instrument (#10680)
* Switch executor to wasm-instrument * Switch pallet-contracts to wasm-instrument
This commit is contained in:
committed by
GitHub
parent
d174ff8a61
commit
2a122c44b1
@@ -18,8 +18,8 @@
|
||||
|
||||
use super::RuntimeBlob;
|
||||
use crate::error::{self, Error};
|
||||
use pwasm_utils::parity_wasm::elements::Instruction;
|
||||
use std::mem;
|
||||
use wasm_instrument::parity_wasm::elements::Instruction;
|
||||
|
||||
/// This is a snapshot of data segments specialzied for a particular instantiation.
|
||||
///
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::error::WasmError;
|
||||
use pwasm_utils::{
|
||||
use wasm_instrument::{
|
||||
export_mutable_globals,
|
||||
parity_wasm::elements::{deserialize_buffer, serialize, DataSegment, Internal, Module},
|
||||
};
|
||||
@@ -84,7 +84,7 @@ impl RuntimeBlob {
|
||||
/// depth of the wasm operand stack.
|
||||
pub fn inject_stack_depth_metering(self, stack_depth_limit: u32) -> Result<Self, WasmError> {
|
||||
let injected_module =
|
||||
pwasm_utils::stack_height::inject_limiter(self.raw_module, stack_depth_limit).map_err(
|
||||
wasm_instrument::inject_stack_limiter(self.raw_module, stack_depth_limit).map_err(
|
||||
|e| WasmError::Other(format!("cannot inject the stack limiter: {:?}", e)),
|
||||
)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user