Skip to content

Commit

Permalink
remove oboslete todo's
Browse files Browse the repository at this point in the history
  • Loading branch information
leongb committed Nov 18, 2020
1 parent a504105 commit 1b22704
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
10 changes: 7 additions & 3 deletions zcashtools/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#![allow(dead_code, unused_imports, unused_mut, unused_variables, clippy::too_many_arguments)]
#![allow(
dead_code,
unused_imports,
unused_mut,
unused_variables,
clippy::too_many_arguments
)]

mod neon_bridge;
mod prover_ledger;
Expand Down Expand Up @@ -312,7 +318,6 @@ impl ZcashBuilderLedger {
}

pub fn add_sapling_spend(&mut self, info: SpendBuilderInfo) -> Result<(), Error> {
//todo: add decryption here
let note = info
.address
.create_note(u64::from(info.value), info.rseed)
Expand All @@ -333,7 +338,6 @@ impl ZcashBuilderLedger {
}

pub fn add_sapling_output(&mut self, info: OutputBuilderInfo) -> Result<(), Error> {
//todo: add decryption here
let r = self.builder.add_sapling_output(
info.ovk,
info.address,
Expand Down
6 changes: 3 additions & 3 deletions zcashtools/src/prover_ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl SaplingProvingContextLedger {

// Construct signature message
let mut data_to_be_signed = [0u8; 64];
//data_to_be_signed[0..32].copy_from_slice(&bvk.0.to_bytes());//fixme
data_to_be_signed[0..32].copy_from_slice(&bvk.0.to_bytes());
(&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]);

// Sign
Expand All @@ -295,8 +295,8 @@ impl SaplingProvingContextLedger {
}
}

impl Default for SaplingProvingContextLedger{
fn default() -> Self{
impl Default for SaplingProvingContextLedger {
fn default() -> Self {
Self::new()
}
}
8 changes: 4 additions & 4 deletions zcashtools/src/txbuilder_ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,9 @@ impl<P: consensus::Parameters, R: RngCore + CryptoRng> Builder<P, R> {
diversifier: Diversifier,
note: Note,
merkle_path: MerklePath<Node>,
alpha: jubjub::Fr, //get from ledger
proofkey: ProofGenerationKey, //get from ledger
rcv: jubjub::Fr, //get from ledger
alpha: jubjub::Fr, //get from ledger
proofkey: ProofGenerationKey, //get from ledger
rcv: jubjub::Fr, //get from ledger
) -> Result<(), Error> {
// Consistency check: all anchors must equal the first one
//Fixme: add this later when we get info from chain
Expand Down Expand Up @@ -982,7 +982,7 @@ mod tests {
let mut rng = OsRng;
let note1 = to
.create_note(50000, Rseed::BeforeZip212(jubjub::Fr::one())) //fixme))
.create_note(50000, Rseed::BeforeZip212(jubjub::Fr::one())) //))
.unwrap();
let cmu1 = Node::new(note1.cmu().to_repr());
let mut tree = CommitmentTree::new();
Expand Down

0 comments on commit 1b22704

Please sign in to comment.