pub fn count_satisfiable<'a, I>(
withdrawals: I,
available_assets: u128,
) -> (u32, u128)where
I: IntoIterator<Item = &'a PendingWithdrawal>,Expand description
Calculate how many withdrawals can be fully satisfied from a queue.
Iterates through withdrawals in order, counting how many can be fully satisfied before running out of available assets.
§Arguments
withdrawals- Iterator over pending withdrawals (in queue order).available_assets- Total assets available for withdrawals.
§Returns
Tuple of (count of satisfiable withdrawals, total assets needed for those withdrawals).