Skip to main content

fake_bundle_for_branch

Function fake_bundle_for_branch 

Source
pub fn fake_bundle_for_branch(
    branch_id: BranchId,
    pool: ValuePool,
    n_actions: usize,
    seed: u64,
) -> Option<Bundle<Authorized, ZatBalance>>
Expand description

Builds a bundle for pool that is valid under branch_id, or None if the pool is not defined for that consensus branch (Ironwood before NU6.3).

The bundle version — and therefore which flag sets are representable — is derived from branch_id, so a bundle built here always matches the transaction it will be placed in. The flags are the maximal set representable under that version: the Orchard pool disables cross-address transfers from NU6.3 onward and requires them enabled before, while the Ironwood pool encodes the choice in its flag byte.