Skip to content

Commit 2212217

Browse files
jonastheisomerfirmak
authored andcommitted
Fix idle peers with eth68
1 parent a32a4ad commit 2212217

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

eth/downloader/peer.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ func (ps *peerSet) HeaderIdlePeers() ([]*peerConnection, int) {
413413
throughput := func(p *peerConnection) int {
414414
return p.rates.Capacity(eth.BlockHeadersMsg, time.Second)
415415
}
416-
return ps.idlePeers(eth.ETH66, eth.ETH66, idle, throughput)
416+
return ps.idlePeers(eth.ETH66, eth.ETH68, idle, throughput)
417417
}
418418

419419
// BodyIdlePeers retrieves a flat list of all the currently body-idle peers within
@@ -425,7 +425,7 @@ func (ps *peerSet) BodyIdlePeers() ([]*peerConnection, int) {
425425
throughput := func(p *peerConnection) int {
426426
return p.rates.Capacity(eth.BlockBodiesMsg, time.Second)
427427
}
428-
return ps.idlePeers(eth.ETH66, eth.ETH66, idle, throughput)
428+
return ps.idlePeers(eth.ETH66, eth.ETH68, idle, throughput)
429429
}
430430

431431
// ReceiptIdlePeers retrieves a flat list of all the currently receipt-idle peers
@@ -437,7 +437,7 @@ func (ps *peerSet) ReceiptIdlePeers() ([]*peerConnection, int) {
437437
throughput := func(p *peerConnection) int {
438438
return p.rates.Capacity(eth.ReceiptsMsg, time.Second)
439439
}
440-
return ps.idlePeers(eth.ETH66, eth.ETH66, idle, throughput)
440+
return ps.idlePeers(eth.ETH66, eth.ETH68, idle, throughput)
441441
}
442442

443443
// NodeDataIdlePeers retrieves a flat list of all the currently node-data-idle
@@ -449,7 +449,7 @@ func (ps *peerSet) NodeDataIdlePeers() ([]*peerConnection, int) {
449449
throughput := func(p *peerConnection) int {
450450
return p.rates.Capacity(eth.NodeDataMsg, time.Second)
451451
}
452-
return ps.idlePeers(eth.ETH66, eth.ETH66, idle, throughput)
452+
return ps.idlePeers(eth.ETH66, eth.ETH68, idle, throughput)
453453
}
454454

455455
// idlePeers retrieves a flat list of all currently idle peers satisfying the

les/downloader/peer.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ func (ps *peerSet) HeaderIdlePeers() ([]*peerConnection, int) {
413413
throughput := func(p *peerConnection) int {
414414
return p.rates.Capacity(eth.BlockHeadersMsg, time.Second)
415415
}
416-
return ps.idlePeers(eth.ETH66, eth.ETH66, idle, throughput)
416+
return ps.idlePeers(eth.ETH66, eth.ETH68, idle, throughput)
417417
}
418418

419419
// BodyIdlePeers retrieves a flat list of all the currently body-idle peers within
@@ -425,7 +425,7 @@ func (ps *peerSet) BodyIdlePeers() ([]*peerConnection, int) {
425425
throughput := func(p *peerConnection) int {
426426
return p.rates.Capacity(eth.BlockBodiesMsg, time.Second)
427427
}
428-
return ps.idlePeers(eth.ETH66, eth.ETH66, idle, throughput)
428+
return ps.idlePeers(eth.ETH66, eth.ETH68, idle, throughput)
429429
}
430430

431431
// ReceiptIdlePeers retrieves a flat list of all the currently receipt-idle peers
@@ -437,7 +437,7 @@ func (ps *peerSet) ReceiptIdlePeers() ([]*peerConnection, int) {
437437
throughput := func(p *peerConnection) int {
438438
return p.rates.Capacity(eth.ReceiptsMsg, time.Second)
439439
}
440-
return ps.idlePeers(eth.ETH66, eth.ETH66, idle, throughput)
440+
return ps.idlePeers(eth.ETH66, eth.ETH68, idle, throughput)
441441
}
442442

443443
// NodeDataIdlePeers retrieves a flat list of all the currently node-data-idle
@@ -449,7 +449,7 @@ func (ps *peerSet) NodeDataIdlePeers() ([]*peerConnection, int) {
449449
throughput := func(p *peerConnection) int {
450450
return p.rates.Capacity(eth.NodeDataMsg, time.Second)
451451
}
452-
return ps.idlePeers(eth.ETH66, eth.ETH66, idle, throughput)
452+
return ps.idlePeers(eth.ETH66, eth.ETH68, idle, throughput)
453453
}
454454

455455
// idlePeers retrieves a flat list of all currently idle peers satisfying the

0 commit comments

Comments
 (0)