eth/downloader/queue.go — Version Comparison
|
v1.16.8 |
v1.17.3 |
| Branch |
etc/v1.16.8-full-node |
etc/v1.17.3-full-node |
| Delta |
+5 -0 |
+5 -0 |
ETC delta on v1.16.8 (+5 -0)
diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go
index 9fe169d5f..d7fb05322 100644
--- a/eth/downloader/queue.go
+++ b/eth/downloader/queue.go
@@ -151,6 +151,8 @@ type queue struct {
active *sync.Cond
closed bool
+ revokeHook func(string) // ETC: called by Revoke under lock to also revoke header requests
+
logTime time.Time // Time instance when status was last reported
}
@@ -496,6 +498,9 @@ func (q *queue) Revoke(peerID string) {
q.lock.Lock()
defer q.lock.Unlock()
+ if q.revokeHook != nil {
+ q.revokeHook(peerID)
+ }
if request, ok := q.blockPendPool[peerID]; ok {
for _, header := range request.Headers {
q.blockTaskQueue.Push(header, -int64(header.Number.Uint64()))
ETC delta on v1.17.3 (+5 -0)
diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go
index 585906b8b..62429c6b3 100644
--- a/eth/downloader/queue.go
+++ b/eth/downloader/queue.go
@@ -150,6 +150,8 @@ type queue struct {
active *sync.Cond
closed bool
+ revokeHook func(string) // ETC: called by Revoke under lock to also revoke header requests
+
logTime time.Time // Time instance when status was last reported
}
@@ -493,6 +495,9 @@ func (q *queue) Revoke(peerID string) {
q.lock.Lock()
defer q.lock.Unlock()
+ if q.revokeHook != nil {
+ q.revokeHook(peerID)
+ }
if request, ok := q.blockPendPool[peerID]; ok {
for _, header := range request.Headers {
q.blockTaskQueue.Push(header, -int64(header.Number.Uint64()))
← Back to Version Comparison