core/filtermaps: fix operator precedence in delete logging condition

This commit is contained in:
David Klank 2025-11-26 15:29:25 +02:00 committed by GitHub
parent cf93077fab
commit bdc2119f0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -434,7 +434,7 @@ func (f *FilterMaps) safeDeleteWithLogs(deleteFn func(db ethdb.KeyValueStore, ha
lastLogPrinted = start
)
switch err := deleteFn(f.db, f.hashScheme, func(deleted bool) bool {
if deleted && !logPrinted || time.Since(lastLogPrinted) > time.Second*10 {
if deleted && (!logPrinted || time.Since(lastLogPrinted) > time.Second*10) {
log.Info(action+" in progress...", "elapsed", common.PrettyDuration(time.Since(start)))
logPrinted, lastLogPrinted = true, time.Now()
}