From 4e2d35f256bea2fee3a6cbd7af0c0c15a37c0a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bene=C5=A1?= Date: Mon, 30 Oct 2023 12:02:05 +0100 Subject: [PATCH] fix: `compute_note_hash_and_nullifier` compiler check (#3351) --- compiler/noirc_frontend/src/hir/aztec_library.rs | 2 +- compiler/noirc_frontend/src/hir/def_collector/errors.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/noirc_frontend/src/hir/aztec_library.rs b/compiler/noirc_frontend/src/hir/aztec_library.rs index ad286a0ab91..fa51a09d4f9 100644 --- a/compiler/noirc_frontend/src/hir/aztec_library.rs +++ b/compiler/noirc_frontend/src/hir/aztec_library.rs @@ -280,7 +280,7 @@ fn transform_module( // Check for a user defined storage struct let storage_defined = check_for_storage_definition(&module); - if storage_defined && check_for_compute_note_hash_and_nullifier_definition(&module) { + if storage_defined && !check_for_compute_note_hash_and_nullifier_definition(&module) { let crate_graph = &context.crate_graph[crate_id]; return Err(( DefCollectorErrorKind::AztecComputeNoteHashAndNullifierNotFound { diff --git a/compiler/noirc_frontend/src/hir/def_collector/errors.rs b/compiler/noirc_frontend/src/hir/def_collector/errors.rs index 2abacbc64da..5fc0d236ee5 100644 --- a/compiler/noirc_frontend/src/hir/def_collector/errors.rs +++ b/compiler/noirc_frontend/src/hir/def_collector/errors.rs @@ -67,6 +67,7 @@ pub enum DefCollectorErrorKind { TraitImplOrphaned { span: Span }, // Aztec feature flag errors + // TODO(benesjan): https://github.com/AztecProtocol/aztec-packages/issues/2905 #[cfg(feature = "aztec")] #[error("Aztec dependency not found. Please add aztec as a dependency in your Cargo.toml")] AztecNotFound {},