mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
Adds a test to ensure that we clear the heap between calls into runtime (#4903)
* Adds a test to ensure that we clear the heap between calls into runtime The tests shows that we currently not clearing the heap in wasmtime. For now we don't run the test for wasmtime. * Fix compilation
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
//! Definitions for a wasm runtime.
|
||||
|
||||
use crate::error::Error;
|
||||
use sp_wasm_interface::Function;
|
||||
use sp_wasm_interface::{Function, Value};
|
||||
|
||||
/// A trait that defines an abstract wasm runtime.
|
||||
///
|
||||
@@ -28,4 +28,7 @@ pub trait WasmRuntime {
|
||||
|
||||
/// Call a method in the Substrate runtime by name. Returns the encoded result on success.
|
||||
fn call(&mut self, method: &str, data: &[u8]) -> Result<Vec<u8>, Error>;
|
||||
|
||||
/// Get the value from a global with the given `name`.
|
||||
fn get_global_val(&self, name: &str) -> Result<Option<Value>, Error>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user