diff --git a/node/malus/src/variants/common.rs b/node/malus/src/variants/common.rs index ab1dfbbb360a..6c4709ec00a1 100644 --- a/node/malus/src/variants/common.rs +++ b/node/malus/src/variants/common.rs @@ -162,11 +162,20 @@ where pub fn create_fake_candidate_commitments( persisted_validation_data: &PersistedValidationData, ) -> CandidateCommitments { + // Backing rejects candidates which output the same head as the parent, + // therefore we must create a new head which is not equal to the parent. + let mut head_data = persisted_validation_data.parent_head.clone(); + if head_data.0.is_empty() { + head_data.0.push(0); + } else { + head_data.0[0] = head_data.0[0].wrapping_add(1); + }; + CandidateCommitments { upward_messages: Default::default(), horizontal_messages: Default::default(), new_validation_code: None, - head_data: persisted_validation_data.parent_head.clone(), + head_data, processed_downward_messages: 0, hrmp_watermark: persisted_validation_data.relay_parent_number, }