diff --git a/mempool/mempool.go b/mempool/mempool.go index e1ed4f26..5acb6f0d 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -401,7 +401,7 @@ func (mem *Mempool) collectTxs(maxTxs int) types.Txs { // NOTE: unsafe; Lock/Unlock must be managed by caller func (mem *Mempool) Update(height int64, txs types.Txs) error { // First, create a lookup map of txns in new txs. - txsMap := make(map[string]struct{}) + txsMap := make(map[string]struct{}, len(txs)) for _, tx := range txs { txsMap[string(tx)] = struct{}{} }