Skip to content

Commit

Permalink
optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
BananaLF committed Dec 11, 2023
1 parent 0faff8c commit 735c096
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/tendermint/mempool/clist_mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 735c096

Please sign in to comment.