Function Channel.foldHTLCs

Fold HTLCs for which we've learned the secrets for or which have their lock time expired.

Balance foldHTLCs (
  in ref const(Balance) old_balance,
  in const(geod24.bitblob.BitBlob!(64L)[]) secrets,
  in const(geod24.bitblob.BitBlob!(64L)[]) revert_htlcs,
  in const(Height) height
);

TODO

can we merge this and buildUpdatedBalance() ?

Parameters

NameDescription
old_balance the current balance
secrets any new secrets we've discovered
height the current known block height

Returns

the new balance to use during the next signing process