Skip to content

Commit

Permalink
Rename network to network_upgrade
Browse files Browse the repository at this point in the history
Make it clearer, to avoid mixing up `Network` and `NetworkUpgrade`
types.

Co-authored-by: teor <teor@riseup.net>
  • Loading branch information
jvff and teor2345 committed Jun 22, 2021
1 parent a7973cd commit d0ea656
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zebra-consensus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,12 @@ where
unimplemented!("V5 transaction validation is not yet complete");
}

/// Verifies if a V5 `transaction` is supported by the network `upgrade`.
/// Verifies if a V5 `transaction` is supported by `network_upgrade`.
fn verify_v5_transaction_network_upgrade(
transaction: &Transaction,
upgrade: NetworkUpgrade,
network_upgrade: NetworkUpgrade,
) -> Result<(), TransactionError> {
match upgrade {
match network_upgrade {
// Supports V5 transactions
NetworkUpgrade::Nu5 => Ok(()),

Expand All @@ -445,7 +445,7 @@ where
| NetworkUpgrade::Heartwood
| NetworkUpgrade::Canopy => Err(TransactionError::UnsupportedByNetworkUpgrade(
transaction.version(),
upgrade,
network_upgrade,
)),
}
}
Expand Down

0 comments on commit d0ea656

Please sign in to comment.