Skip to content

Commit 8bdf1d2

Browse files
committed
lncfg: validate msg-burst-bytes
1 parent b381060 commit 8bdf1d2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lncfg/gossip.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,13 @@ func (g *Gossip) Validate() error {
7070
g.MsgBurstBytes, lnwire.MaxSliceLength)
7171
}
7272

73-
if g.MsgRateBytes < g.PeerMsgRateBytes {
74-
return fmt.Errorf("msg-rate-bytes=%v must be at greater than "+
73+
if g.MsgBurstBytes <= g.MsgRateBytes {
74+
return fmt.Errorf("msg-burst-bytes=%v must be greater than "+
75+
"msg-rate-bytes=%v", g.MsgBurstBytes, g.MsgRateBytes)
76+
}
77+
78+
if g.MsgRateBytes <= g.PeerMsgRateBytes {
79+
return fmt.Errorf("msg-rate-bytes=%v must be greater than "+
7580
"peer-msg-rate-bytes=%v", g.MsgRateBytes,
7681
g.PeerMsgRateBytes)
7782
}

0 commit comments

Comments
 (0)