diff --git a/libs/tendermint/mempool/clist_mempool.go b/libs/tendermint/mempool/clist_mempool.go index dde2eea2ed..bf63262b20 100644 --- a/libs/tendermint/mempool/clist_mempool.go +++ b/libs/tendermint/mempool/clist_mempool.go @@ -322,6 +322,9 @@ func (mem *CListMempool) validatePeerCount(txInfo TxInfo) error { } func (mem *CListMempool) resetPeerCount() { + if cfg.DynamicConfig.GetMaxTxLimitPerPeer() == 0 { + return + } mem.peersTxCountMtx.Lock() defer mem.peersTxCountMtx.Unlock() for key := range mem.peersTxCount {