Fix logging (#587)

* Fix logging

* Add error info
This commit is contained in:
Gav Wood
2018-08-21 12:19:11 +02:00
committed by GitHub
parent e35a4a3995
commit 2673c26414
2 changed files with 5 additions and 2 deletions
@@ -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()),
+1 -1
View File
@@ -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 {