mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
Merge d0df3b050d into 12eabbd76d
This commit is contained in:
commit
055ddce259
1 changed files with 11 additions and 4 deletions
|
|
@ -426,10 +426,17 @@ func (r *mapRenderer) writeFinishedMaps(pauseCb func() bool) error {
|
||||||
}
|
}
|
||||||
// add or update filter rows
|
// add or update filter rows
|
||||||
for rowIndex := uint32(0); rowIndex < r.f.mapHeight; rowIndex++ {
|
for rowIndex := uint32(0); rowIndex < r.f.mapHeight; rowIndex++ {
|
||||||
var (
|
base := len(r.finishedMaps)
|
||||||
mapIndices []uint32
|
extra := 0
|
||||||
rows []FilterRow
|
if newRange.maps.AfterLast() == r.finished.AfterLast() {
|
||||||
)
|
if oldRange.maps.AfterLast() > r.finished.AfterLast() {
|
||||||
|
extra = int(oldRange.maps.AfterLast() - r.finished.AfterLast())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
capacity := base + extra
|
||||||
|
|
||||||
|
mapIndices := make([]uint32, 0, capacity)
|
||||||
|
rows := make([]FilterRow, 0, capacity)
|
||||||
for mapIndex := range r.finished.Iter() {
|
for mapIndex := range r.finished.Iter() {
|
||||||
row := r.finishedMaps[mapIndex].filterMap[rowIndex]
|
row := r.finishedMaps[mapIndex].filterMap[rowIndex]
|
||||||
if fm, _ := r.f.filterMapCache.Get(mapIndex); fm != nil && row.Equal(fm[rowIndex]) {
|
if fm, _ := r.f.filterMapCache.Get(mapIndex); fm != nil && row.Equal(fm[rowIndex]) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue