Skip to content

queueWithHeaders.PendingHeaders

Source (upstream pre-purge) Current
File eth/downloader/queue.go queue_pow.go
Symbol queue.PendingHeaders queueWithHeaders.PendingHeaders
Ref 45baf2111~1 etc/v1.17.3-full-node

3-way merge — purge → getc ← upstream

pre-purge≈ adapted (origin inferred by similarity)fork-only
// PendingHeaders retrieves the number of header requests pending for retrieval.
func (q *queueWithHeaders) PendingHeaders() int {
q.queue.lock.Lock()
defer q.queue.lock.Unlock()
return q.headerTaskQueue.Size()
}
core-geth validation — +3 -3 | | | |---|---| | File | [`queue.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/eth/downloader/queue.go) | | Symbol | `queue.PendingHeaders` | | Ref | `v1.12.20` |
--- a/core-geth/eth/downloader/queue.go
+++ b/etc/eth/downloader/queue_pow.go
@@ -1,7 +1,7 @@
 // PendingHeaders retrieves the number of header requests pending for retrieval.
-func (q *queue) PendingHeaders() int {
-   q.lock.Lock()
-   defer q.lock.Unlock()
+func (q *queueWithHeaders) PendingHeaders() int {
+   q.queue.lock.Lock()
+   defer q.queue.lock.Unlock()

    return q.headerTaskQueue.Size()
 }

← Sync & Downloader