mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
core: remove unnecessary log copy (#27475)
This commit is contained in:
parent
d03859d49e
commit
c8c39efb63
1 changed files with 4 additions and 3 deletions
|
|
@ -2263,9 +2263,10 @@ func (bc *BlockChain) collectLogs(b *types.Block, removed bool) []*types.Log {
|
||||||
var logs []*types.Log
|
var logs []*types.Log
|
||||||
for _, receipt := range receipts {
|
for _, receipt := range receipts {
|
||||||
for _, log := range receipt.Logs {
|
for _, log := range receipt.Logs {
|
||||||
l := *log
|
if removed {
|
||||||
l.Removed = removed
|
log.Removed = true
|
||||||
logs = append(logs, &l)
|
}
|
||||||
|
logs = append(logs, log)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return logs
|
return logs
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue