Skip to content

eth/downloader/peer.go

Type MOD
Upstream Lines 288
Changed +3 -0

Add header capacity tracking to peers

diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go
index d20bda69e..a58dc2853 100644
--- a/eth/downloader/peer.go
+++ b/eth/downloader/peer.go
@@ -21,6 +21,7 @@ package downloader

 import (
    "errors"
+   "math/big"
    "sync"
    "time"

@@ -56,6 +57,8 @@ type peerConnection struct {

 // Peer encapsulates the methods required to synchronise with a remote full peer.
 type Peer interface {
+   Head() (common.Hash, *big.Int)
+
    RequestHeadersByHash(common.Hash, int, int, bool, chan *eth.Response) (*eth.Request, error)
    RequestHeadersByNumber(uint64, int, int, bool, chan *eth.Response) (*eth.Request, error)

← Back to Sync & Downloader