mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-24 20:53:07 +02:00
lnwallet: add IsAdd helper to AuxHtlcDescriptor
We also add the IsAdd helper to the AuxHtlcDescriptor, as external software using the aux framework might want to know which type of HTLC this is.
This commit is contained in:
committed by
Oliver Gugger
parent
53554cd438
commit
c9d8e41e34
@@ -116,6 +116,18 @@ func (a *AuxHtlcDescriptor) AddHeight(
|
||||
return a.addCommitHeightLocal
|
||||
}
|
||||
|
||||
// IsAdd checks if the entry type of the Aux HTLC Descriptor is an add type.
|
||||
func (a *AuxHtlcDescriptor) IsAdd() bool {
|
||||
switch a.EntryType {
|
||||
case Add:
|
||||
fallthrough
|
||||
case NoOpAdd:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// RemoveHeight returns the height at which the HTLC was removed from the
|
||||
// commitment chain. The height is returned based on the chain the HTLC is being
|
||||
// removed from (local or remote chain).
|
||||
|
Reference in New Issue
Block a user