diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 32492171f..a208cda93 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -2545,6 +2545,18 @@ type HtlcView struct { FeePerKw chainfee.SatPerKWeight } +// AuxOurUpdates returns the outgoing HTLCs as a read-only copy of +// AuxHtlcDescriptors. +func (v *HtlcView) AuxOurUpdates() []AuxHtlcDescriptor { + return fn.Map(newAuxHtlcDescriptor, v.OurUpdates) +} + +// AuxTheirUpdates returns the incoming HTLCs as a read-only copy of +// AuxHtlcDescriptors. +func (v *HtlcView) AuxTheirUpdates() []AuxHtlcDescriptor { + return fn.Map(newAuxHtlcDescriptor, v.TheirUpdates) +} + // fetchHTLCView returns all the candidate HTLC updates which should be // considered for inclusion within a commitment based on the passed HTLC log // indexes.