Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Dec 12, 2024
1 parent d011486 commit e8e7b6d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/state/exec3/historical_trace_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func CustomTraceMapReduce(fromBlock, toBlock uint64, consumer TraceConsumer, ctx
}
logEvery := time.NewTicker(1 * time.Second)
defer logEvery.Stop()
for blockNum := fromBlock; blockNum < toBlock; blockNum++ {
for blockNum := fromBlock; blockNum < toBlock && !workersExited.Load(); blockNum++ {
var b *types.Block
b, err = blockWithSenders(ctx, nil, tx, br, blockNum)
if err != nil {
Expand Down Expand Up @@ -460,10 +460,6 @@ func CustomTraceMapReduce(fromBlock, toBlock uint64, consumer TraceConsumer, ctx
return err
}
}
if workersExited.Load() {
return workers.Wait()
}

in.Add(ctx, txTask)
inputTxNum++

Expand All @@ -472,7 +468,6 @@ func CustomTraceMapReduce(fromBlock, toBlock uint64, consumer TraceConsumer, ctx
// log.Info("[dbg] in", "in", in.Len())
//default:
//}

}
}
in.Close() //no more work. no retries in map-reduce. means can close here.
Expand Down

0 comments on commit e8e7b6d

Please sign in to comment.