From a9a9eab449726b23ecb6d034945d84bac0d853eb Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Wed, 14 Jun 2023 15:57:04 -0400 Subject: [PATCH] Remove unnecessary log copy --- core/blockchain.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index c9b80bc2fffb..ec8b789c586b 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2053,11 +2053,10 @@ func (bc *BlockChain) collectLogs(b *types.Block, removed bool) []*types.Log { var logs []*types.Log for _, receipt := range receipts { for _, log := range receipt.Logs { - l := *log if removed { - l.Removed = true + log.Removed = true } - logs = append(logs, &l) + logs = append(logs, log) } } return logs