diff --git a/blocktx/peer_handler.go b/blocktx/peer_handler.go index e3a912527..b3f9766ea 100644 --- a/blocktx/peer_handler.go +++ b/blocktx/peer_handler.go @@ -495,8 +495,8 @@ func (bs *PeerHandler) markTransactionsAsMined(blockId uint64, merkleTree []*cha return fmt.Errorf("failed to insert block transactions at block height %d: %v", blockHeight, err) } // free up memory - txs = txs[:0] - merklePaths = merklePaths[:0] + txs = make([]*blocktx_api.TransactionAndSource, 0, bs.transactionStorageBatchSize) + merklePaths = make([]string, 0, bs.transactionStorageBatchSize) // print stats, call gc and chec the result bs.printMemStats()