From 95a2b277536bf2c3ff92154072af46558bbe0bbd Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:27:53 -0600 Subject: [PATCH] Revert "core: remove unnecessary log copy (#27475)" This reverts commit 44a8cecbc6ad8c6ff0d25c56199b1b5d11a74e5d. --- core/blockchain.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index ec8b789c586b..c9b80bc2fffb 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2053,10 +2053,11 @@ 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 { - log.Removed = true + l.Removed = true } - logs = append(logs, log) + logs = append(logs, &l) } } return logs