Skip to main content

fake_compact_block

Function fake_compact_block 

Source
pub fn fake_compact_block(
    height: BlockHeight,
    prev_hash: BlockHash,
    nf: Nullifier,
    dfvk: &DiversifiableFullViewingKey,
    value: Zatoshis,
    tx_after: bool,
    initial_tree_sizes: Option<(u32, u32)>,
) -> CompactBlock
Available on crate features test-dependencies only.
Expand description

Create a fake CompactBlock at the given height, with a transaction containing a single spend of the given nullifier and a single output paying the given address. Returns the CompactBlock.

Set initial_tree_sizes to None to simulate a CompactBlock retrieved from a lightwalletd that is not currently tracking note commitment tree sizes.