From cf5d708202d548446ce718df9ab8c660a33d662e Mon Sep 17 00:00:00 2001 From: porcuquine Date: Tue, 5 Oct 2021 19:33:58 -0700 Subject: [PATCH] Add InputOutputMismatch error. --- src/errors.rs | 2 ++ src/r1cs.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/errors.rs b/src/errors.rs index 7038121..80f3ef9 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -12,6 +12,8 @@ pub enum NovaError { InvalidInputLength, /// returned if the supplied witness is not of the right length InvalidWitnessLength, + /// returned if the supplied instance input does not match the previous instance output + InputOutputMismatch, /// returned if the supplied witness is not a satisfying witness to a given shape and instance UnSat, /// returned when the supplied compressed commitment cannot be decompressed diff --git a/src/r1cs.rs b/src/r1cs.rs index 85b95e7..4f17d3b 100644 --- a/src/r1cs.rs +++ b/src/r1cs.rs @@ -399,7 +399,7 @@ impl RelaxedR1CSInstance { } for i in 0..self.Y_last.len() { if self.Y_last[i] != U2.X[i] { - return Err(NovaError::InvalidInputLength); + return Err(NovaError::InputOutputMismatch); } } }