mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
Merge pull request #8456 from Roasbeef/record-zero-fn
tlv: add new Zero method on RecordT
This commit is contained in:
@@ -87,6 +87,11 @@ func (t *RecordT[T, V]) TlvType() Type {
|
|||||||
return t.recordType.TypeVal()
|
return t.recordType.TypeVal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Zero returns a zero value of the record type.
|
||||||
|
func (t *RecordT[T, V]) Zero() RecordT[T, V] {
|
||||||
|
return ZeroRecordT[T, V]()
|
||||||
|
}
|
||||||
|
|
||||||
// OptionalRecordT is a high-order type that represents an optional TLV record.
|
// OptionalRecordT is a high-order type that represents an optional TLV record.
|
||||||
// This can be used when a TLV record doesn't always need to be present (ok to
|
// This can be used when a TLV record doesn't always need to be present (ok to
|
||||||
// be odd).
|
// be odd).
|
||||||
|
Reference in New Issue
Block a user