commit
b0a8838f37
|
@ -93,10 +93,8 @@ impl SpendDescriptionInfo {
|
||||||
|
|
||||||
fn build<Pr: SpendProver>(
|
fn build<Pr: SpendProver>(
|
||||||
self,
|
self,
|
||||||
anchor: Option<bls12_381::Scalar>,
|
anchor: bls12_381::Scalar,
|
||||||
) -> Result<SpendDescription<InProgress<Unproven, Unsigned>>, Error> {
|
) -> Result<SpendDescription<InProgress<Unproven, Unsigned>>, Error> {
|
||||||
let anchor = anchor.expect("Sapling anchor must be set if Sapling spends are present.");
|
|
||||||
|
|
||||||
// Construct the value commitment.
|
// Construct the value commitment.
|
||||||
let cv = ValueCommitment::derive(self.note.value(), self.rcv.clone());
|
let cv = ValueCommitment::derive(self.note.value(), self.rcv.clone());
|
||||||
|
|
||||||
|
@ -471,7 +469,12 @@ impl SaplingBuilder {
|
||||||
// Create the unauthorized Spend and Output descriptions.
|
// Create the unauthorized Spend and Output descriptions.
|
||||||
let shielded_spends = spend_infos
|
let shielded_spends = spend_infos
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|a| a.build::<SP>(self.anchor))
|
.map(|a| {
|
||||||
|
a.build::<SP>(
|
||||||
|
self.anchor
|
||||||
|
.expect("Sapling anchor must be set if Sapling spends are present."),
|
||||||
|
)
|
||||||
|
})
|
||||||
.collect::<Result<Vec<_>, _>>()?;
|
.collect::<Result<Vec<_>, _>>()?;
|
||||||
let shielded_outputs = output_infos
|
let shielded_outputs = output_infos
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
Loading…
Reference in New Issue