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:
Bastian Köcher
2019-10-30 16:34:00 +01:00
committed by GitHub
parent 5486d7add2
commit 7627428f44
5 changed files with 102 additions and 116 deletions
+1 -1
View File
@@ -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>>;
}