Skip to main content

check_branch_id

Function check_branch_id 

Source
pub(crate) fn check_branch_id(
    upgrade: NetworkUpgrade,
    branch_ids: &HashMap<NetworkUpgrade, ConsensusBranchId>,
) -> Result<(), ParametersBuilderError>
Expand description

Returns an error if upgrade needs a consensus branch ID and branch_ids has none for it.

Every ZIP 221 history tree node commits to its network upgrade’s branch ID, so zebrad would panic at the activation block of an upgrade without one. Upgrades before Overwinter need none.