@@ -128,6 +128,7 @@ type FilterMaps struct {
128128
129129 // test hooks
130130 testDisableSnapshots , testSnapshotUsed bool
131+ testProcessEventsHook func ()
131132}
132133
133134// filterMap is a full or partial in-memory representation of a filter map where
@@ -573,7 +574,7 @@ func (f *FilterMaps) getFilterMapRow(mapIndex, rowIndex uint32, baseLayerOnly bo
573574 }
574575 f .baseRowsCache .Add (baseMapRowIndex , baseRows )
575576 }
576- baseRow := baseRows [mapIndex & (f .baseRowGroupLength - 1 )]
577+ baseRow := slices . Clone ( baseRows [mapIndex & (f .baseRowGroupLength - 1 )])
577578 if baseLayerOnly {
578579 return baseRow , nil
579580 }
@@ -610,7 +611,9 @@ func (f *FilterMaps) storeFilterMapRowsOfGroup(batch ctxcdb.Batch, mapIndices []
610611 if uint32 (len (mapIndices )) != f .baseRowGroupLength { // skip base rows read if all rows are replaced
611612 var ok bool
612613 baseRows , ok = f .baseRowsCache .Get (baseMapRowIndex )
613- if ! ok {
614+ if ok {
615+ baseRows = slices .Clone (baseRows )
616+ } else {
614617 var err error
615618 baseRows , err = rawdb .ReadFilterMapBaseRows (f .db , baseMapRowIndex , f .baseRowGroupLength , f .logMapWidth )
616619 if err != nil {
@@ -656,7 +659,7 @@ func (f *FilterMaps) mapRowIndex(mapIndex, rowIndex uint32) uint64 {
656659// called from outside the indexerLoop goroutine.
657660func (f * FilterMaps ) getBlockLvPointer (blockNumber uint64 ) (uint64 , error ) {
658661 if blockNumber >= f .indexedRange .blocks .AfterLast () && f .indexedRange .headIndexed {
659- return f .indexedRange .headDelimiter , nil
662+ return f .indexedRange .headDelimiter + 1 , nil
660663 }
661664 if lvPointer , ok := f .lvPointerCache .Get (blockNumber ); ok {
662665 return lvPointer , nil
0 commit comments