This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-22
lines changed Expand file tree Collapse file tree 2 files changed +3
-22
lines changed Original file line number Diff line number Diff line change @@ -2404,28 +2404,14 @@ async fn launch_approval<Context>(
2404
2404
2405
2405
match val_rx. await {
2406
2406
Err ( _) => return ApprovalState :: failed ( validator_index, candidate_hash) ,
2407
- Ok ( Ok ( ValidationResult :: Valid ( commitments , _) ) ) => {
2407
+ Ok ( Ok ( ValidationResult :: Valid ( _ , _) ) ) => {
2408
2408
// Validation checked out. Issue an approval command. If the underlying service is unreachable,
2409
2409
// then there isn't anything we can do.
2410
2410
2411
2411
gum:: trace!( target: LOG_TARGET , ?candidate_hash, ?para_id, "Candidate Valid" ) ;
2412
2412
2413
- let expected_commitments_hash = candidate. commitments_hash ;
2414
- if commitments. hash ( ) == expected_commitments_hash {
2415
- let _ = metrics_guard. take ( ) ;
2416
- return ApprovalState :: approved ( validator_index, candidate_hash)
2417
- } else {
2418
- // Commitments mismatch - issue a dispute.
2419
- issue_local_invalid_statement (
2420
- & mut sender,
2421
- session_index,
2422
- candidate_hash,
2423
- candidate. clone ( ) ,
2424
- ) ;
2425
-
2426
- metrics_guard. take ( ) . on_approval_invalid ( ) ;
2427
- return ApprovalState :: failed ( validator_index, candidate_hash)
2428
- }
2413
+ let _ = metrics_guard. take ( ) ;
2414
+ return ApprovalState :: approved ( validator_index, candidate_hash)
2429
2415
} ,
2430
2416
Ok ( Ok ( ValidationResult :: Invalid ( reason) ) ) => {
2431
2417
gum:: warn!(
Original file line number Diff line number Diff line change @@ -467,11 +467,6 @@ where
467
467
. await ;
468
468
469
469
if let Ok ( ValidationResult :: Valid ( ref outputs, _) ) = validation_result {
470
- // If validation produces new commitments we consider the candidate invalid.
471
- if candidate_receipt. commitments_hash != outputs. hash ( ) {
472
- return Ok ( ValidationResult :: Invalid ( InvalidCandidate :: CommitmentsHashMismatch ) )
473
- }
474
-
475
470
let ( tx, rx) = oneshot:: channel ( ) ;
476
471
match runtime_api_request (
477
472
sender,
You can’t perform that action at this time.
0 commit comments