Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Apr 14, 2023
1 parent 3d258dd commit 9b340a2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions zebra-consensus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,22 @@ impl Request {

/// Returns lowest height at which all transparent coinbase spends will be valid,
/// or None if this transaction has no transparent coinbase spends.
pub fn maturity_height(&self, spent_utxos: &HashMap<transparent::OutPoint, transparent::Utxo>) -> Option<block::Height> {
pub fn maturity_height(
&self,
spent_utxos: &HashMap<transparent::OutPoint, transparent::Utxo>,
) -> Option<block::Height> {
match self {
// TODO: return an error for Request::Block to replace this check in the state (#2336)
Request::Block { .. } => None,

Request::Mempool { transaction, height } => check::tx_transparent_coinbase_spends_maturity(
Request::Mempool {
transaction,
height,
} => check::tx_transparent_coinbase_spends_maturity(
transaction.transaction.clone(),
*height,
Default::default(),
spent_utxos
spent_utxos,
),
}
}
Expand Down Expand Up @@ -434,7 +440,7 @@ where
))
.map(|res| {
assert!(
res? == zs::Response::ValidBestChainTipNullifiersAndAnchors,
res? == zs::Response::ValidBestChainTipNullifiersAndAnchors,
"unexpected response to CheckBestChainTipNullifiersAndAnchors request"
);
Ok(())
Expand Down

0 comments on commit 9b340a2

Please sign in to comment.