Skip to content

Commit

Permalink
Merge branch 'dev' into impl_inp_src_for_trbid
Browse files Browse the repository at this point in the history
  • Loading branch information
zancas committed Apr 19, 2024
2 parents d9cc573 + c4f7698 commit 114f8c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions zingolib/src/test_framework/mocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ macro_rules! build_method {
}
pub(crate) use build_method;
pub use proposal::{ProposalBuilder, StepBuilder};
pub use sapling_note::LRZSaplingNoteBuilder;
pub use sapling_crypto_note::SaplingCryptoNoteBuilder;

fn zaddr_from_seed(
seed: [u8; 32],
Expand Down Expand Up @@ -71,7 +71,7 @@ pub fn random_zaddr() -> (
}

// Sapling Note Mocker
mod sapling_note {
mod sapling_crypto_note {

use sapling_crypto::value::NoteValue;
use sapling_crypto::Note;
Expand All @@ -82,16 +82,16 @@ mod sapling_note {

/// A struct to build a mock sapling_crypto::Note from scratch.
/// Distinguish [`sapling_crypto::Note`] from [`crate::wallet::notes::SaplingNote`]. The latter wraps the former with some other attributes.
pub struct LRZSaplingNoteBuilder {
pub struct SaplingCryptoNoteBuilder {
recipient: Option<PaymentAddress>,
value: Option<NoteValue>,
rseed: Option<Rseed>,
}

impl LRZSaplingNoteBuilder {
impl SaplingCryptoNoteBuilder {
/// Instantiate an empty builder.
pub fn new() -> Self {
LRZSaplingNoteBuilder {
SaplingCryptoNoteBuilder {
recipient: None,
value: None,
rseed: None,
Expand All @@ -118,7 +118,7 @@ mod sapling_note {
)
}
}
impl Default for LRZSaplingNoteBuilder {
impl Default for SaplingCryptoNoteBuilder {
fn default() -> Self {
let (_, _, address) = default_zaddr();
Self::new()
Expand Down
2 changes: 1 addition & 1 deletion zingolib/src/wallet/notes/sapling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ pub mod mocks {
fn default() -> Self {
SaplingNoteBuilder::new()
.diversifier(sapling_crypto::Diversifier([0; 11]))
.note(crate::test_framework::mocks::LRZSaplingNoteBuilder::default().build())
.note(crate::test_framework::mocks::SaplingCryptoNoteBuilder::default().build())
.witnessed_position(Some(Position::from(0)))
.output_index(Some(0))
.nullifier(Some(sapling_crypto::Nullifier::from_bytes([0; 32])))
Expand Down

0 comments on commit 114f8c1

Please sign in to comment.