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
@@ -259,12 +259,7 @@ fn test_genesis_head(size: usize) -> HeadData {
}
fn test_validation_code(size: usize) -> ValidationCode {
let mut validation_code = vec![0u8; size as usize];
// 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; size as usize];
ValidationCode(validation_code)
}