Patch for concurrent iterator & others (onto v1.11.6) #386

Closed
roysc wants to merge 1565 commits from v1.11.6-statediff-v5 into master
2 changed files with 2 additions and 2 deletions
Showing only changes of commit b32d20324e - Show all commits

View File

@ -857,7 +857,7 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header,
} }
for _, header := range request.Headers[:i] { for _, header := range request.Headers[:i] {
if res, stale, err := q.resultCache.GetDeliverySlot(header.Number.Uint64()); err == nil { if res, stale, err := q.resultCache.GetDeliverySlot(header.Number.Uint64()); err == nil && !stale {
reconstruct(accepted, res) reconstruct(accepted, res)
} else { } else {
// else: between here and above, some other peer filled this result, // else: between here and above, some other peer filled this result,

View File

@ -870,7 +870,7 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header,
} }
for _, header := range request.Headers[:i] { for _, header := range request.Headers[:i] {
if res, stale, err := q.resultCache.GetDeliverySlot(header.Number.Uint64()); err == nil { if res, stale, err := q.resultCache.GetDeliverySlot(header.Number.Uint64()); err == nil && !stale {
reconstruct(accepted, res) reconstruct(accepted, res)
} else { } else {
// else: between here and above, some other peer filled this result, // else: between here and above, some other peer filled this result,