mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Catch native panics when executing the wasm runtime (#3953)
As with the native runtime, we now catch all native panics when we execute the wasm runtime. The panics inside the wasm runtime were already catched before by the wasm executor automatically, but any panic in the host functions could bring down the node. The recent switch to execute the native counterpart of the host function in `sr-io`, makes this change required. The native `sr-io` functions just `panic` when something is not provided or any other error occured.
This commit is contained in:
@@ -180,7 +180,7 @@ pub trait Function {
|
||||
fn execute(
|
||||
&self,
|
||||
context: &mut dyn FunctionContext,
|
||||
args: &mut dyn Iterator<Item=Value>,
|
||||
args: &mut dyn Iterator<Item = Value>,
|
||||
) -> Result<Option<Value>>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user