Skip to main content

process_pads

Function process_pads 

Source
pub fn process_pads(directives: &[Directive]) -> PadResult
Expand description

Process pad directives and generate synthetic transactions.

This function:

  1. Tracks account inventories
  2. When a pad is encountered, stores it as pending
  3. When a balance assertion is encountered for an account with a pending pad, generates a synthetic transaction to make the balance match
  4. Returns the directives with synthetic transactions inserted

§Arguments

  • directives - The directives to process (should be sorted by date)

§Returns

A PadResult containing:

  • The original directives (with pads preserved for reference)
  • Synthetic padding transactions
  • Any errors encountered