Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Dedup
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
  • Loading branch information
sandreim committed Mar 30, 2022
1 parent 4719ad3 commit 519d693
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions node/malus/src/variants/suggest_garbage_candidate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ use polkadot_node_subsystem_util::request_validators;
use crate::{
interceptor::*,
shared::{MALICIOUS_POV, MALUS},
variants::{FakeCandidateValidation, FakeCandidateValidationError, ReplaceValidationResult},
variants::{
create_fake_candidate_commitments, FakeCandidateValidation, FakeCandidateValidationError,
ReplaceValidationResult,
},
};

// Import extra types relevant to the particular
Expand Down Expand Up @@ -169,14 +172,8 @@ where
(collator_pair.public(), collator_pair.sign(&signature_payload))
};

let malicious_commitments = CandidateCommitments {
upward_messages: Vec::new(),
horizontal_messages: Vec::new(),
new_validation_code: None,
head_data: malicious_available_data.validation_data.parent_head.clone(),
processed_downward_messages: 0,
hrmp_watermark: validation_data_relay_parent_number,
};
let malicious_commitments =
create_fake_candidate_commitments(&malicious_available_data.validation_data);

let malicious_candidate = CandidateReceipt {
descriptor: CandidateDescriptor {
Expand Down

0 comments on commit 519d693

Please sign in to comment.