Skip to content

Commit

Permalink
Expose some test functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hhanh00 committed Apr 30, 2023
1 parent 50ee3c6 commit cba7463
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ pub use self::nullifier::Nullifier;
pub struct RandomSeed([u8; 32]);

impl RandomSeed {
pub(crate) fn random(rng: &mut impl RngCore, rho: &Nullifier) -> Self {
/// Create a random random seed
pub fn random(rng: &mut impl RngCore, rho: &Nullifier) -> Self {
loop {
let mut bytes = [0; 32];
rng.fill_bytes(&mut bytes);
Expand Down
2 changes: 1 addition & 1 deletion src/note/nullifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Nullifier {
///
/// Instead of explicitly sampling for a unique nullifier, we rely here on the size of
/// the base field to make the chance of sampling a colliding nullifier negligible.
pub(crate) fn dummy(rng: &mut impl RngCore) -> Self {
pub fn dummy(rng: &mut impl RngCore) -> Self {
Nullifier(extract_p(&pallas::Point::random(rng)))
}

Expand Down

0 comments on commit cba7463

Please sign in to comment.