Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion substrate/executor/src/native_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_) => {
trace!(target: "executor", "Invalid code presented to executor");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it's useful to print contents of Err

RuntimePreproc::InvalidCode
}
});
match maybe_runtime_preproc {
RuntimePreproc::InvalidCode => Err(ErrorKind::InvalidCode(code.into()).into()),
Expand Down
2 changes: 1 addition & 1 deletion substrate/state-machine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down