Skip to content

Commit

Permalink
core: remove unnecessary log copy (ethereum#27475)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Dec 28, 2024
1 parent d03859d commit c8c39ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2263,9 +2263,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
l.Removed = removed
logs = append(logs, &l)
if removed {
log.Removed = true
}
logs = append(logs, log)
}
}
return logs
Expand Down

0 comments on commit c8c39ef

Please sign in to comment.