Skip to content

Commit

Permalink
fix alloc compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Neotamandua committed Nov 2, 2023
1 parent 1bef995 commit 63a867d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// Copyright (c) DUSK NETWORK. All rights reserved.

use crate::note::TRANSPARENT_BLINDER;
use crate::BlsScalar;
use crate::{Crossover, Error, Fee, Note, NoteType, Remainder};

use core::convert::TryFrom;
use dusk_bls12_381::BlsScalar;
use dusk_jubjub::{JubJubScalar, GENERATOR_EXTENDED, GENERATOR_NUMS_EXTENDED};
use dusk_poseidon::cipher::PoseidonCipher;

Expand Down
3 changes: 1 addition & 2 deletions src/crossover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

//! Fee module contains the logic related to `Crossover` structure
use crate::BlsScalar;

use dusk_bls12_381::BlsScalar;
use dusk_bytes::{DeserializableSlice, Error as BytesError, Serializable};
use dusk_jubjub::{JubJubAffine, JubJubExtended};
use dusk_poseidon::cipher::PoseidonCipher;
Expand Down
3 changes: 1 addition & 2 deletions src/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//! Fee module contains the logic related to `Fee` and `Remainder` structure
use crate::{Ownable, PublicKey, StealthAddress};
use dusk_bls12_381::BlsScalar;
use dusk_bytes::{DeserializableSlice, Error as BytesError, Serializable};
use dusk_jubjub::JubJubScalar;
use dusk_poseidon::sponge::hash;
Expand All @@ -17,8 +18,6 @@ use rkyv::{Archive, Deserialize, Serialize};

use core::cmp;

use crate::BlsScalar;

mod remainder;
pub use remainder::Remainder;

Expand Down
3 changes: 1 addition & 2 deletions src/fee/remainder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ use crate::{Ownable, StealthAddress};
#[cfg(feature = "rkyv-impl")]
use rkyv::{Archive, Deserialize, Serialize};

use dusk_bls12_381::BlsScalar;
use dusk_poseidon::sponge::hash;

use crate::BlsScalar;

/// The Remainder structure.
#[derive(Clone, Copy, Debug)]
#[cfg_attr(
Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub mod note;

/// Phoenix Core Keys & Addresses
mod keys;
///

mod permutation;

/// Public (Spend) Key
Expand All @@ -52,5 +52,3 @@ pub use message::Message;
pub use note::{Note, NoteType};
#[cfg(feature = "alloc")]
pub use transaction::Transaction;

use dusk_bls12_381::BlsScalar;
3 changes: 2 additions & 1 deletion src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
//
// Copyright (c) DUSK NETWORK. All rights reserved.

use crate::{BlsScalar, Error, Note, NoteType};
use crate::{Error, Note, NoteType};

#[cfg(feature = "rkyv-impl")]
use rkyv::{Archive, Deserialize, Serialize};

use crate::PublicKey;
use dusk_bls12_381::BlsScalar;
use dusk_bytes::{DeserializableSlice, Serializable};
use dusk_jubjub::{dhke, JubJubAffine, JubJubExtended, JubJubScalar};
use dusk_poseidon::cipher::PoseidonCipher;
Expand Down
5 changes: 2 additions & 3 deletions src/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

use core::convert::{TryFrom, TryInto};

use crate::{Ownable, PublicKey, SecretKey, StealthAddress, ViewKey};
use crate::{Error, Ownable, PublicKey, SecretKey, StealthAddress, ViewKey};
use dusk_bls12_381::BlsScalar;
use dusk_bytes::{DeserializableSlice, Error as BytesError, Serializable};
use dusk_jubjub::{
dhke, JubJubAffine, JubJubExtended, JubJubScalar, GENERATOR_EXTENDED,
Expand All @@ -20,8 +21,6 @@ use rand_core::{CryptoRng, RngCore};
#[cfg(feature = "rkyv-impl")]
use rkyv::{Archive, Deserialize, Serialize};

use crate::{BlsScalar, Error};

/// Blinder used for transparent
pub(crate) const TRANSPARENT_BLINDER: JubJubScalar = JubJubScalar::zero();

Expand Down
2 changes: 1 addition & 1 deletion src/transaction/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use alloc::vec::Vec;
use dusk_bls12_381::BlsScalar;
use dusk_bls12_381_sign::{PublicKey, Signature};
use dusk_bytes::Serializable;
use phoenix_core::StealthAddress;
use crate::StealthAddress;
#[cfg(feature = "rkyv-impl")]
use rkyv::{Archive, Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion src/transaction/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use alloc::vec::Vec;

use dusk_bls12_381::BlsScalar;
use dusk_poseidon::cipher::PoseidonCipher;
use phoenix_core::StealthAddress;
use crate::StealthAddress;
#[cfg(feature = "rkyv-impl")]
use rkyv::{Archive, Deserialize, Serialize};

Expand Down

0 comments on commit 63a867d

Please sign in to comment.