Skip to content

Commit

Permalink
Fix Orchard ZSA workflow tests to make it compilable with getblocktem…
Browse files Browse the repository at this point in the history
…plate-rpcs feature enabled
  • Loading branch information
dmidem committed Dec 6, 2024
1 parent 29af613 commit 2b7926a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zebra-consensus/src/orchard_zsa/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ fn calc_asset_supply_info<'a, I: IntoIterator<Item = &'a TranscriptItem>>(
) -> Result<SupplyInfo, IssuanceError> {
blocks
.into_iter()
.flat_map(|(Request::Commit(block), _)| &block.transactions)
.filter_map(|(request, _)| match request {
Request::Commit(block) => Some(&block.transactions),
#[cfg(feature = "getblocktemplate-rpcs")]
Request::CheckProposal(_) => None,
})
.flatten()
.try_fold(SupplyInfo::new(), |mut supply_info, tx| {
process_burns(&mut supply_info, tx.orchard_burns().iter())?;
process_issue_actions(&mut supply_info, tx.orchard_issue_actions())?;
Expand Down

0 comments on commit 2b7926a

Please sign in to comment.