Skip to content

Commit

Permalink
Add first_issuance flag
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykoren committed Dec 20, 2024
1 parent b61b7f2 commit 7401cd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion zcash_primitives/src/transaction/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ impl<'a, P: consensus::Parameters> Builder<'a, P, ()> {
ik: IssuanceAuthorizingKey,
asset_desc: Vec<u8>,
issue_info: Option<IssueInfo>,
first_issuance: bool,
) -> Result<(), Error<FE>> {
assert!(self.build_config.orchard_bundle_type()? == BundleType::DEFAULT_ZSA);

Expand All @@ -482,6 +483,7 @@ impl<'a, P: consensus::Parameters> Builder<'a, P, ()> {
IssuanceValidatingKey::from(&ik),
asset_desc,
issue_info,
first_issuance,
OsRng,
)
.map_err(Error::IssuanceBundle)?
Expand All @@ -499,12 +501,13 @@ impl<'a, P: consensus::Parameters> Builder<'a, P, ()> {
asset_desc: &[u8],
recipient: Address,
value: orchard::value::NoteValue,
first_issuance: bool,
) -> Result<(), Error<FE>> {
assert!(self.build_config.orchard_bundle_type()? == BundleType::DEFAULT_ZSA);
self.issuance_builder
.as_mut()
.ok_or(Error::IssuanceBuilderNotAvailable)?
.add_recipient(asset_desc, recipient, value, OsRng)
.add_recipient(asset_desc, recipient, value, first_issuance, OsRng)
.map_err(Error::IssuanceBundle)?;

Ok(())
Expand Down

0 comments on commit 7401cd8

Please sign in to comment.