Skip to main content

read_v5_bundle

Function read_v5_bundle 

Source
pub fn read_v5_bundle<R: Read>(
    reader: R,
    consensus_branch_id: BranchId,
) -> Result<Option<Bundle<Authorized, ZatBalance>>>
Expand description

Reads an [orchard::Bundle] from a v5 transaction format.

The v5 Orchard wire serialization is identical in every epoch (flag bit 2 is reserved), but the returned bundle’s [BundleVersion] — which fixes its cross-address semantics and circuit generation — follows the consensus epoch identified by consensus_branch_id (see bundle_version_for_branch). A non-empty Orchard bundle under a consensus branch that predates NU5 is rejected as invalid data.