Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions zebra-chain/src/parameters/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ pub const SAPLING_VERSION_GROUP_ID: u32 = 0x892F_2085;
/// Orchard transactions must use transaction version 5 and this version
/// group ID. Sapling transactions can use v4 or v5 transactions.
pub const TX_V5_VERSION_GROUP_ID: u32 = 0x26A7_270A;

/// The version group ID for version 6 transactions.
///
/// Orchard transactions must use transaction version 5 and this version
/// group ID.
// FIXME: use a proper value!
pub const TX_V6_VERSION_GROUP_ID: u32 = 0x26A7_270B;
5 changes: 4 additions & 1 deletion zebra-chain/src/primitives/zcash_primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,16 @@ impl TryFrom<&Transaction> for zp_tx::Transaction {
///
/// # Panics
///
/// If the transaction is not V5. (Currently there is no need for this
/// If the transaction is not V5/V6. (Currently there is no need for this
/// conversion for other versions.)
#[allow(clippy::unwrap_in_result)]
fn try_from(trans: &Transaction) -> Result<Self, Self::Error> {
let network_upgrade = match trans {
Transaction::V5 {
network_upgrade, ..
}
| Transaction::V6 {
network_upgrade, ..
} => network_upgrade,
Transaction::V1 { .. }
| Transaction::V2 { .. }
Expand Down
Loading