Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardmack committed Sep 17, 2024
1 parent 9429632 commit f869cba
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion dot/parachain/candidate-validation/candidate_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func (cv *CandidateValidation) processMessage(msg any) {
}

result, err := cv.pvfHost.validate(validationTask)

if err != nil {
logger.Errorf("failed to validate from exhaustive: %w", err)
msg.Ch <- parachaintypes.OverseerFuncRes[ValidationResult]{
Expand Down
1 change: 0 additions & 1 deletion dot/parachain/candidate-validation/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ type workerTask struct {

func newWorker(validationCode parachaintypes.ValidationCode) (*worker, error) {
parachainRuntime, err := parachainruntime.SetupVM(validationCode)

if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions dot/parachain/candidate-validation/worker_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (v *workerPool) executeRequest(msg *ValidationTask) (*ValidationResult, err
return nil, err
}
}
syncWorker := v.workers[validationCodeHash]
worker := v.workers[validationCodeHash]

logger.Debugf("sending request", validationCodeHash)

Expand All @@ -154,7 +154,7 @@ func (v *workerPool) executeRequest(msg *ValidationTask) (*ValidationResult, err
maxPoVSize: msg.PersistedValidationData.MaxPovSize,
candidateReceipt: msg.CandidateReceipt,
}
return syncWorker.executeRequest(workTask)
return worker.executeRequest(workTask)

}

Expand Down
1 change: 1 addition & 0 deletions dot/parachain/runtime/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func (in *Instance) ValidateBlock(params ValidationParameters) (

// ValidatorInstance for candidate validation methods
type ValidatorInstance interface {
// ValidateBlock validates a block by calling parachain runtime's validate_block call and returns the result.
ValidateBlock(params ValidationParameters) (*ValidationResult, error)
}

Expand Down

0 comments on commit f869cba

Please sign in to comment.