Skip to main content

branch_id_of

Function branch_id_of 

Source
fn branch_id_of(network_upgrade: NetworkUpgrade, fallback: BranchId) -> BranchId
Expand description

Returns the librustzcash consensus branch ID for network_upgrade, falling back to fallback when the upgrade has no branch ID that librustzcash recognises.

Shielded bundles must be built for the branch of the transaction that will carry them, since the branch selects the bundle version and therefore which flags are representable. The fallback must match the one the corresponding Transaction::test_v* constructor uses, or the bundle would be built for a different branch than the transaction it ends up in. In particular NU7’s branch ID is behind an unstable feature, so a v6 transaction at NU7 falls back to NU6.3 — the branch where v6 and the Ironwood pool were introduced.