Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Daksh14 committed Jun 12, 2024
1 parent 5c36536 commit ac13f28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use alloc::{
alloc::{alloc, dealloc, Layout},
vec::Vec,
};
use core::mem;

use dusk_bytes::Serializable;
use phoenix_core::{Fee, Note, SecretKey, ViewKey};
Expand Down Expand Up @@ -419,11 +418,11 @@ pub fn nullifiers(args: i32, len: i32) -> i64 {
core::array::from_fn(|i| key::derive_vk(&seed, i as _));

for note in notes {
let Some(vk_idx) = vks.iter().position(|vk| vk.owns(&note)) else {
let Some(idx) = vks.iter().position(|vk| vk.owns(&note)) else {
return utils::fail();
};

nullifiers.push(note.gen_nullifier(&sks[vk_idx]));
nullifiers.push(note.gen_nullifier(&sks[idx]));
}

utils::rkyv_into_ptr(nullifiers)
Expand Down
2 changes: 1 addition & 1 deletion tests/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ mod node {
.into_iter()
.map(|value| {
let obfuscated = (rng.next_u32() & 1) == 1;
let idx = rng.next_u64() % (MAX_KEY) as u64;
let idx = rng.next_u64() % MAX_KEY as u64;
let sk = key::derive_sk(seed, idx);
let pk = PublicKey::from(&sk);

Expand Down

0 comments on commit ac13f28

Please sign in to comment.