mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 05:26:36 +00:00
core: remove unnecessary log copy (#27475)
The logs in this function are pulled straight from disk in rawdb.ReadRawReceipts and also modified in receipts.DeriveFields, so removing the copy should be fine.
This commit is contained in:
parent
7823ff6d06
commit
93ecd77d77
1 changed files with 2 additions and 3 deletions
|
|
@ -2053,11 +2053,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 {
|
if removed {
|
||||||
l.Removed = true
|
log.Removed = true
|
||||||
}
|
}
|
||||||
logs = append(logs, &l)
|
logs = append(logs, log)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return logs
|
return logs
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue