Skip to main content

read_v6_bundle

Function read_v6_bundle 

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

Reads an [orchard::Bundle] from a v6 transaction format. pool selects the bundle slot to read: the Orchard slot ([ValuePool::Orchard]) or the Ironwood slot ([ValuePool::Ironwood], whose flag-byte encoding permits the cross-address bit, unlike the Orchard v6 pool). The slot’s [BundleVersion] is derived from consensus_branch_id (see bundle_version_for_branch); a non-empty bundle in a slot whose value pool is not supported under the transaction’s consensus branch is rejected as invalid data.