remove WASM_MAGIC (#2832)

* remove WASM_MAGIC

* fix test warnings
This commit is contained in:
Robert Habermeier
2021-04-07 11:00:22 +02:00
committed by GitHub
parent e67f31cc49
commit 251b6ca7bf
5 changed files with 7 additions and 39 deletions
+1 -6
View File
@@ -160,12 +160,7 @@ impl<T: frame_system::Config> Registrar for TestRegistrar<T> {
#[cfg(test)]
fn worst_validation_code() -> ValidationCode {
let mut validation_code = vec![0u8; 1000];
// Replace first bytes of code with "WASM_MAGIC" to pass validation test.
let _ = validation_code.splice(
..crate::WASM_MAGIC.len(),
crate::WASM_MAGIC.iter().cloned(),
).collect::<Vec<_>>();
let validation_code = vec![0u8; 1000];
validation_code.into()
}