mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 02:00:54 +02:00
lnwire+multi: define HasMaxHtlc helper on msgFlags
This commit is contained in:
@ -156,7 +156,7 @@ func ValidateChannelUpdateAnn(pubKey *btcec.PublicKey, capacity btcutil.Amount,
|
||||
func validateOptionalFields(capacity btcutil.Amount,
|
||||
msg *lnwire.ChannelUpdate) error {
|
||||
|
||||
if msg.MessageFlags&lnwire.ChanUpdateOptionMaxHtlc != 0 {
|
||||
if msg.MessageFlags.HasMaxHtlc() {
|
||||
maxHtlc := msg.HtlcMaximumMsat
|
||||
if maxHtlc == 0 || maxHtlc < msg.HtlcMinimumMsat {
|
||||
return errors.Errorf("invalid max htlc for channel "+
|
||||
|
Reference in New Issue
Block a user