Skip to content

Commit

Permalink
Use a real address for dummy spends
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Feb 23, 2024
1 parent da9842c commit 0346973
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/core/component/shielded-pool/src/spend/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use ark_ff::UniformRand;
use decaf377::{FieldExt, Fq, Fr};
use decaf377_rdsa::{Signature, SpendAuth};
use penumbra_asset::{Balance, Value, STAKING_TOKEN_ASSET_ID};
use penumbra_keys::{Address, FullViewingKey};
use penumbra_keys::{keys::AddressIndex, FullViewingKey};
use penumbra_proto::{core::component::shielded_pool::v1 as pb, DomainType};
use penumbra_sct::Nullifier;
use penumbra_tct as tct;
Expand Down Expand Up @@ -42,8 +42,9 @@ impl SpendPlan {
}

/// Create a dummy [`SpendPlan`].
pub fn dummy<R: CryptoRng + RngCore>(rng: &mut R) -> SpendPlan {
let dummy_address = Address::dummy(rng);
pub fn dummy<R: CryptoRng + RngCore>(rng: &mut R, fvk: &FullViewingKey) -> SpendPlan {
// A valid address we can spend; since the note is hidden, we can just pick the default.
let dummy_address = fvk.payment_address(AddressIndex::default()).0;
let rseed = Rseed::generate(rng);
let dummy_note = Note::from_parts(
dummy_address,
Expand Down

0 comments on commit 0346973

Please sign in to comment.