Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiEres committed Nov 6, 2024
1 parent d15226e commit 9ada1ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions polkadot/node/core/backing/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ async fn assert_validate_from_exhaustive(
) if validation_data == *assert_pvd &&
validation_code == *assert_validation_code &&
*pov == *assert_pov && candidate_receipt.descriptor == assert_candidate.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate_receipt.commitments_hash == assert_candidate.commitments.hash() =>
{
response_sender.send(Ok(ValidationResult::Valid(
Expand Down Expand Up @@ -652,7 +652,7 @@ fn backing_works(#[case] elastic_scaling_mvp: bool) {
) if validation_data == pvd_ab &&
validation_code == validation_code_ab &&
*pov == pov_ab && candidate_receipt.descriptor == candidate_a.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate_receipt.commitments_hash == candidate_a_commitments_hash =>
{
response_sender.send(Ok(
Expand Down Expand Up @@ -1288,7 +1288,7 @@ fn backing_works_while_validation_ongoing() {
) if validation_data == pvd_abc &&
validation_code == validation_code_abc &&
*pov == pov_abc && candidate_receipt.descriptor == candidate_a.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate_a_commitments_hash == candidate_receipt.commitments_hash =>
{
// we never validate the candidate. our local node
Expand Down Expand Up @@ -1455,7 +1455,7 @@ fn backing_misbehavior_works() {
) if validation_data == pvd_a &&
validation_code == validation_code_a &&
*pov == pov_a && candidate_receipt.descriptor == candidate_a.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate_a_commitments_hash == candidate_receipt.commitments_hash =>
{
response_sender.send(Ok(
Expand Down Expand Up @@ -1622,7 +1622,7 @@ fn backing_dont_second_invalid() {
) if validation_data == pvd_a &&
validation_code == validation_code_a &&
*pov == pov_block_a && candidate_receipt.descriptor == candidate_a.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate_a.commitments.hash() == candidate_receipt.commitments_hash =>
{
response_sender.send(Ok(ValidationResult::Invalid(InvalidCandidate::BadReturn))).unwrap();
Expand Down Expand Up @@ -1662,7 +1662,7 @@ fn backing_dont_second_invalid() {
) if validation_data == pvd_b &&
validation_code == validation_code_b &&
*pov == pov_block_b && candidate_receipt.descriptor == candidate_b.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate_b.commitments.hash() == candidate_receipt.commitments_hash =>
{
response_sender.send(Ok(
Expand Down Expand Up @@ -1789,7 +1789,7 @@ fn backing_second_after_first_fails_works() {
) if validation_data == pvd_a &&
validation_code == validation_code_a &&
*pov == pov_a && candidate_receipt.descriptor == candidate.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate.commitments.hash() == candidate_receipt.commitments_hash =>
{
response_sender.send(Ok(ValidationResult::Invalid(InvalidCandidate::BadReturn))).unwrap();
Expand Down Expand Up @@ -1933,7 +1933,7 @@ fn backing_works_after_failed_validation() {
) if validation_data == pvd_a &&
validation_code == validation_code_a &&
*pov == pov_a && candidate_receipt.descriptor == candidate.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate.commitments.hash() == candidate_receipt.commitments_hash =>
{
response_sender.send(Err(ValidationFailed("Internal test error".into()))).unwrap();
Expand Down Expand Up @@ -2212,7 +2212,7 @@ fn retry_works() {
) if validation_data == pvd_a &&
validation_code == validation_code_a &&
*pov == pov_a && candidate_receipt.descriptor == candidate.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate.commitments.hash() == candidate_receipt.commitments_hash
);
virtual_overseer
Expand Down Expand Up @@ -2754,7 +2754,7 @@ fn validator_ignores_statements_from_disabled_validators() {
) if validation_data == pvd &&
validation_code == expected_validation_code &&
*pov == expected_pov && candidate_receipt.descriptor == candidate.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate_commitments_hash == candidate_receipt.commitments_hash =>
{
response_sender.send(Ok(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async fn assert_validate_seconded_candidate(
&validation_code == assert_validation_code &&
&*pov == assert_pov &&
candidate_receipt.descriptor == candidate.descriptor &&
matches!(exec_kind, PvfExecKind::BackingSystemParas { .. }) &&
matches!(exec_kind, PvfExecKind::BackingSystemParas(_)) &&
candidate.commitments.hash() == candidate_receipt.commitments_hash =>
{
response_sender.send(Ok(ValidationResult::Valid(
Expand Down

0 comments on commit 9ada1ad

Please sign in to comment.