Skip to content
Snippets Groups Projects
Commit 2673c264 authored by Gav Wood's avatar Gav Wood Committed by GitHub
Browse files

Fix logging (#587)

* Fix logging

* Add error info
parent e35a4a39
No related merge requests found
......@@ -65,7 +65,10 @@ fn fetch_cached_runtime_version<'a, E: Externalities<KeccakHasher>>(
.and_then(|v| RuntimeVersion::decode(&mut v.as_slice()));
RuntimePreproc::ValidCode(module, version)
}
Err(_) => RuntimePreproc::InvalidCode,
Err(e) => {
trace!(target: "executor", "Invalid code presented to executor ({:?})", e);
RuntimePreproc::InvalidCode
}
});
match maybe_runtime_preproc {
RuntimePreproc::InvalidCode => Err(ErrorKind::InvalidCode(code.into()).into()),
......
......@@ -370,7 +370,7 @@ where
};
if (result.is_ok() && wasm_result.is_ok() && result.as_ref().unwrap() == wasm_result.as_ref().unwrap()/* && delta == wasm_delta*/)
|| (result.is_err() && wasm_result.is_err() && format!("{}", result.as_ref().unwrap_err()) == format!("{}", wasm_result.as_ref().unwrap_err()))
|| (result.is_err() && wasm_result.is_err())
{
(result, delta)
} else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment