Merge pull request #326 from zcash/fix-note-decryption-benchmark

Make note decryption benchmark reliable
This commit is contained in:
str4d 2022-05-06 23:50:43 +01:00 committed by GitHub
commit b1a5c1a635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,11 @@ fn bench_note_decryption(c: &mut Criterion) {
Flags::from_parts(true, true),
Anchor::from_bytes([0; 32]).unwrap(),
);
// The builder pads to two actions, and shuffles their order. Add two recipients
// so the first action is always decryptable.
builder
.add_recipient(None, recipient, NoteValue::from_raw(10), None)
.unwrap();
builder
.add_recipient(None, recipient, NoteValue::from_raw(10), None)
.unwrap();