From c234b2abe9deb5174d3bcb829a3a357508b78af1 Mon Sep 17 00:00:00 2001 From: Sergey Shulepov Date: Thu, 18 Nov 2021 17:54:06 +0000 Subject: [PATCH] Use non-empty validation code --- runtime/parachains/src/builder.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/runtime/parachains/src/builder.rs b/runtime/parachains/src/builder.rs index 362d97ecc259..b88524ed7a41 100644 --- a/runtime/parachains/src/builder.rs +++ b/runtime/parachains/src/builder.rs @@ -21,6 +21,10 @@ use sp_runtime::{ }; use sp_std::{collections::btree_map::BTreeMap, convert::TryInto, prelude::Vec, vec}; +fn dummy_validation_code() -> ValidationCode { + ValidationCode(vec![1, 2, 3]) +} + /// Grab an account, seeded by a name and index. /// /// This is directly from frame-benchmarking. Copy/pasted so we can use it when not compiling with @@ -239,7 +243,7 @@ impl BenchBuilder { para_id, paras::ParaGenesisArgs { genesis_head: Default::default(), - validation_code: Default::default(), + validation_code: dummy_validation_code(), parachain: true, }, ) @@ -394,9 +398,7 @@ impl BenchBuilder { .hash(); let pov_hash = Default::default(); - // NOTE: we use the default `ValidationCode` when setting it in `setup_para_ids`, - // so using the default again here makes sure things line up. - let validation_code_hash = ValidationCode::default().hash(); + let validation_code_hash = dummy_validation_code().hash(); let payload = collator_signature_payload( &relay_parent, ¶_id,