Update filter_system.go

This commit is contained in:
0xcharry 2026-02-11 16:01:35 +01:00 committed by GitHub
parent 919b238c82
commit 1e944c1885
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)
totalLogs := 0
for _, txLogs := range logs {
totalLogs += len(txLogs)
}
flattened := make([]*types.Log, 0, totalLogs)
var logIdx uint
for i, txLogs := range logs {
for _, log := range txLogs {