Add note about relationship between signatures and proofs

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
str4d 2022-06-23 22:33:40 +01:00 committed by GitHub
parent 81626b3b28
commit 4bed67218a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,8 @@ impl BatchValidator {
pub fn validate<R: RngCore + CryptoRng>(self, vk: &VerifyingKey, rng: R) -> bool {
if self.signatures.is_empty() {
// An empty batch is always valid, but is not free to run; skip it.
// Note that a transaction has at least a binding signature, so if
// there are no signatures, there are also no proofs.
return true;
}