queueWithHeaders.ExpireHeaders¶
| Source (upstream pre-purge) | Current | |
|---|---|---|
| File | eth/downloader/queue.go |
queue_pow.go |
| Symbol | queue.ExpireHeaders |
queueWithHeaders.ExpireHeaders |
| Ref | 45baf2111~1 |
etc/v1.17.3-full-node |
3-way merge — purge → getc ← upstream¶
pre-purge≈ adapted (origin inferred by similarity)fork-only
↗// ExpireHeaders cancels a request that timed out and moves the pending fetch
// task back into the queue for rescheduling.
func (q *queueWithHeaders) ExpireHeaders(peer string) int {
≈ q.queue.lock.Lock()
defer q.queue.lock.Unlock()
↗ headerTimeoutMeter.Mark(1)
return q.expire(peer, q.headerPendPool, q.headerTaskQueue)
}
core-geth validation — +3 -3
| | | |---|---| | File | [`queue.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/eth/downloader/queue.go) | | Symbol | `queue.ExpireHeaders` | | Ref | `v1.12.20` |--- a/core-geth/eth/downloader/queue.go
+++ b/etc/eth/downloader/queue_pow.go
@@ -1,8 +1,8 @@
// ExpireHeaders cancels a request that timed out and moves the pending fetch
// task back into the queue for rescheduling.
-func (q *queue) ExpireHeaders(peer string) int {
- q.lock.Lock()
- defer q.lock.Unlock()
+func (q *queueWithHeaders) ExpireHeaders(peer string) int {
+ q.queue.lock.Lock()
+ defer q.queue.lock.Unlock()
headerTimeoutMeter.Mark(1)
return q.expire(peer, q.headerPendPool, q.headerTaskQueue)