mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-14 12:06:40 +00:00
core: address comments
This commit is contained in:
parent
575c67cfa7
commit
24d3c430ab
1 changed files with 7 additions and 3 deletions
|
|
@ -120,15 +120,19 @@ func (p *statePrefetcher) Prefetch(block *types.Block, statedb *state.StateDB, c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for {
|
for {
|
||||||
tx, done := fetchTx()
|
next, done := fetchTx()
|
||||||
if done {
|
if done {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if _, exists := processed[tx.Hash()]; exists {
|
if _, exists := processed[next.Hash()]; exists {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
stateCpy := statedb.Copy() // closure
|
processed[next.Hash()] = struct{}{}
|
||||||
|
|
||||||
|
var (
|
||||||
|
stateCpy = statedb.Copy() // closure
|
||||||
|
tx = next // closure
|
||||||
|
)
|
||||||
workers.Go(func() error {
|
workers.Go(func() error {
|
||||||
// If block precaching was interrupted, abort
|
// If block precaching was interrupted, abort
|
||||||
if interrupt != nil && interrupt.Load() {
|
if interrupt != nil && interrupt.Load() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue