mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 14:17:56 +01:00
lncfg: validate msg-burst-bytes
This commit is contained in:
@@ -74,8 +74,13 @@ func (g *Gossip) Validate() error {
|
|||||||
g.MsgBurstBytes, lnwire.MaxSliceLength)
|
g.MsgBurstBytes, lnwire.MaxSliceLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
if g.MsgRateBytes < g.PeerMsgRateBytes {
|
if g.MsgBurstBytes <= g.MsgRateBytes {
|
||||||
return fmt.Errorf("msg-rate-bytes=%v must be at greater than "+
|
return fmt.Errorf("msg-burst-bytes=%v must be greater than "+
|
||||||
|
"msg-rate-bytes=%v", g.MsgBurstBytes, g.MsgRateBytes)
|
||||||
|
}
|
||||||
|
|
||||||
|
if g.MsgRateBytes <= g.PeerMsgRateBytes {
|
||||||
|
return fmt.Errorf("msg-rate-bytes=%v must be greater than "+
|
||||||
"peer-msg-rate-bytes=%v", g.MsgRateBytes,
|
"peer-msg-rate-bytes=%v", g.MsgRateBytes,
|
||||||
g.PeerMsgRateBytes)
|
g.PeerMsgRateBytes)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user