-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
use crate::note::note_interface::NoteInterface; | ||
|
||
/// When obtaining notes via `get_notes(...)` a note hash is computed for each note when constraining it (and a read | ||
/// request is created and passed to kernels). This same note hash (called note_hash_for_read_request) is needed when | ||
/// removing notes. Since computing this hash is expensive and since it is needed when removing a note we return it | ||
/// from the `get_notes(...)` function. The purpose of this struct is to couple the note and the note hash and make it | ||
/// easier to pass these values around. | ||
struct NoteAndHash<Note> { | ||
note: Note, | ||
hash: Field, | ||
hash: Field, // (note_hash_for_read_request) | ||
} |