multi: add new config peer-msg-rate-bytes
This commit is contained in:
6 files changed
+28
No files matched your search
@@ -407,6 +407,10 @@ type Config struct {
|
||||
// BanThreshold is the score used to decide whether a given peer is
|
||||
// banned or not.
|
||||
BanThreshold uint64
|
||||
|
||||
// PeerMsgRateBytes is the rate limit for the number of bytes per second
|
||||
// that we'll allocate to outbound gossip messages for a single peer.
|
||||
PeerMsgRateBytes uint64
|
||||
}
|
||||
|
||||
// processedNetworkMsg is a wrapper around networkMsg and a boolean. It is
|
||||
@@ -609,6 +613,7 @@ func New(cfg Config, selfKeyDesc *keychain.KeyDescriptor) *AuthenticatedGossiper
|
||||
AllotedMsgBytesPerSecond: cfg.MsgRateBytes,
|
||||
AllotedMsgBytesBurst: cfg.MsgBurstBytes,
|
||||
FilterConcurrency: cfg.FilterConcurrency,
|
||||
PeerMsgBytesPerSecond: cfg.PeerMsgRateBytes,
|
||||
})
|
||||
|
||||
gossiper.reliableSender = newReliableSender(&reliableSenderCfg{
|
||||
|
||||
Reference in new issue
Block a user