Companion for PR 8913 (#3114)

* Companion for PR 8913

polkadot companion: https://github.com/paritytech/substrate/pull/8913

* update Substrate

Co-authored-by: parity-processbot <>
This commit is contained in:
Sergei Shulepov
2021-06-01 13:03:34 +02:00
committed by GitHub
parent 24d1eb40cc
commit 2239b93d31
6 changed files with 265 additions and 258 deletions
+4 -1
View File
@@ -34,7 +34,10 @@ pub fn validate_candidate(
let blob = prevalidate(code)?;
let artifact = prepare(blob)?;
let executor = TaskExecutor::new()?;
let result = execute(&artifact, params, executor)?;
let result = unsafe {
// SAFETY: This is trivially safe since the artifact is obtained by calling `prepare`.
execute(&artifact, params, executor)?
};
Ok(result)
}