Skip to content

Commit

Permalink
Fix zcash_note_encryption doctests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Apr 8, 2021
1 parent 213cd6c commit dad8663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/zcash_note_encryption/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ rand_core = "0.5.1"

[dev-dependencies]
zcash_primitives = { version = "0.5", path = "../../zcash_primitives" }
jubjub = "0.5.1"
5 changes: 3 additions & 2 deletions components/zcash_note_encryption/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@ pub trait ShieldedOutput<'a, D: Domain> {
/// use rand_core::OsRng;
/// use zcash_primitives::{
/// consensus::TestNetwork,
/// memo::MemoBytes,
/// sapling::{
/// keys::{OutgoingViewingKey, prf_expand},
/// note_encryption::{Memo, sapling_note_encryption},
/// note_encryption::{sapling_note_encryption},
/// Diversifier, PaymentAddress, Rseed, ValueCommitment
/// },
/// };
Expand All @@ -192,7 +193,7 @@ pub trait ShieldedOutput<'a, D: Domain> {
/// let note = to.create_note(value, Rseed::BeforeZip212(rcm)).unwrap();
/// let cmu = note.cmu();
///
/// let mut enc = sapling_note_encryption::<_, TestNetwork>(ovk, note, to, Memo::default(), &mut rng);
/// let mut enc = sapling_note_encryption::<_, TestNetwork>(ovk, note, to, MemoBytes::empty(), &mut rng);
/// let encCiphertext = enc.encrypt_note_plaintext();
/// let outCiphertext = enc.encrypt_outgoing_plaintext(&cv.commitment().into(), &cmu, &mut rng);
/// ```
Expand Down

0 comments on commit dad8663

Please sign in to comment.