PVF: Document that preparation cannot lead to disputes (#6873)

* PVF: Document that preparation cannot lead to disputes

* Add warning for deterministic errors

* Fix warning
This commit is contained in:
Marcin S
2023-03-15 01:35:38 +01:00
committed by GitHub
parent 962bd71eb0
commit ba29d06334
4 changed files with 18 additions and 11 deletions
-6
View File
@@ -120,12 +120,6 @@ impl From<PrepareError> for ValidationError {
fn from(error: PrepareError) -> Self {
// Here we need to classify the errors into two errors: deterministic and non-deterministic.
// See [`PrepareError::is_deterministic`].
//
// We treat the deterministic errors as `InvalidCandidate`. Should those occur they could
// potentially trigger disputes.
//
// All non-deterministic errors are qualified as `InternalError`s and will not trigger
// disputes.
if error.is_deterministic() {
ValidationError::InvalidCandidate(InvalidCandidate::PrepareError(error.to_string()))
} else {