Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update names #960

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading