diff --git a/discovery/gossiper_test.go b/discovery/gossiper_test.go index f8c510af..fca3c254 100644 --- a/discovery/gossiper_test.go +++ b/discovery/gossiper_test.go @@ -453,15 +453,20 @@ func createUpdateAnnouncement(blockHeight uint32, var err error + htlcMinMsat := lnwire.MilliSatoshi(prand.Int63()) a := &lnwire.ChannelUpdate{ ShortChannelID: lnwire.ShortChannelID{ BlockHeight: blockHeight, }, Timestamp: timestamp, - MessageFlags: 0, + MessageFlags: lnwire.ChanUpdateOptionMaxHtlc, ChannelFlags: flags, TimeLockDelta: uint16(prand.Int63()), - HtlcMinimumMsat: lnwire.MilliSatoshi(prand.Int63()), + HtlcMinimumMsat: htlcMinMsat, + + // Since the max HTLC must be greater than the min HTLC to pass channel + // update validation, set it to double the min htlc. + HtlcMaximumMsat: 2 * htlcMinMsat, FeeRate: uint32(prand.Int31()), BaseFee: uint32(prand.Int31()), }