multi: rename due to required maxHTLC bit

We rename `ChanUpdateOptionMaxHtlc` to `ChanUpdateRequiredMaxHtlc`
as with the latest changes it is now required.

Similarly, rename `validateOptionalFields` to
`ValidateChannelUpdateFields`, export it to use it in a later commit.
This commit is contained in:
bitromortac
2023-02-17 18:36:50 +01:00
parent 581e195bfe
commit dd5273c88c
14 changed files with 24 additions and 23 deletions

View File

@ -129,7 +129,7 @@ func ValidateNodeAnn(a *lnwire.NodeAnnouncement) error {
func ValidateChannelUpdateAnn(pubKey *btcec.PublicKey, capacity btcutil.Amount,
a *lnwire.ChannelUpdate) error {
if err := validateOptionalFields(capacity, a); err != nil {
if err := ValidateChannelUpdateFields(capacity, a); err != nil {
return err
}
@ -160,9 +160,9 @@ func VerifyChannelUpdateSignature(msg *lnwire.ChannelUpdate,
return nil
}
// validateOptionalFields validates a channel update's message flags and
// ValidateChannelUpdateFields validates a channel update's message flags and
// corresponding update fields.
func validateOptionalFields(capacity btcutil.Amount,
func ValidateChannelUpdateFields(capacity btcutil.Amount,
msg *lnwire.ChannelUpdate) error {
if msg.MessageFlags.HasMaxHtlc() {