diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index bed71d1f3..6a3d6f00d 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -48,3 +48,4 @@ timeoutPrecommit before starting next round - [common/bit_array] Fixed a bug in the `Or` function - [common/bit_array] Fixed a bug in the `Sub` function (@bradyjoestar) - [common] \#2534 make bit array's PickRandom choose uniformly from true bits +- [p2p] \#2555 fix p2p switch FlushThrottle value (@goolAdapter) diff --git a/p2p/switch.go b/p2p/switch.go index dbef56ebf..8325d7e82 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -103,7 +103,7 @@ func NewSwitch( sw.rng = cmn.NewRand() mConfig := conn.DefaultMConnConfig() - mConfig.FlushThrottle = time.Duration(cfg.FlushThrottleTimeout) * time.Millisecond + mConfig.FlushThrottle = cfg.FlushThrottleTimeout mConfig.SendRate = cfg.SendRate mConfig.RecvRate = cfg.RecvRate mConfig.MaxPacketMsgPayloadSize = cfg.MaxPacketMsgPayloadSize