Update filter_system.go

This commit is contained in:
marukai67 2026-01-29 16:52:08 +01:00 committed by GitHub
parent a179ccf6f0
commit b75c384bee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,7 +115,11 @@ func (sys *FilterSystem) cachedLogElem(ctx context.Context, blockHash common.Has
}
// Database logs are un-derived.
// Fill in whatever we can (txHash is inaccessible at this point).
flattened := make([]*types.Log, 0)
total := 0
for _, txLogs := range logs {
total += len(txLogs)
}
flattened := make([]*types.Log, 0, total)
var logIdx uint
for i, txLogs := range logs {
for _, log := range txLogs {