mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
core/filtermaps: safe row access in matcher backend
This commit is contained in:
parent
dbf620d365
commit
756a6f8261
1 changed files with 3 additions and 0 deletions
|
|
@ -75,6 +75,9 @@ func (fm *FilterMapsMatcherBackend) Close() {
|
||||||
// on write.
|
// on write.
|
||||||
// GetFilterMapRow implements MatcherBackend.
|
// GetFilterMapRow implements MatcherBackend.
|
||||||
func (fm *FilterMapsMatcherBackend) GetFilterMapRow(ctx context.Context, mapIndex, rowIndex uint32, baseLayerOnly bool) (FilterRow, error) {
|
func (fm *FilterMapsMatcherBackend) GetFilterMapRow(ctx context.Context, mapIndex, rowIndex uint32, baseLayerOnly bool) (FilterRow, error) {
|
||||||
|
fm.f.indexLock.RLock()
|
||||||
|
defer fm.f.indexLock.RUnlock()
|
||||||
|
|
||||||
return fm.f.getFilterMapRow(mapIndex, rowIndex, baseLayerOnly)
|
return fm.f.getFilterMapRow(mapIndex, rowIndex, baseLayerOnly)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue