aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader.go
diff options
context:
space:
mode:
authorNick Johnson <arachnid@notdot.net>2017-07-05 17:42:37 +0800
committerNick Johnson <arachnid@notdot.net>2017-07-05 18:13:16 +0800
commitfe13949d9d938316c2c1b037b2cbce8e7bead525 (patch)
treeb0aeafee58c6476b5f824e5a78288be9b406b7b8 /eth/downloader/downloader.go
parentbe8f8409bc7f0f3124b7ebd1480337e4b1942113 (diff)
downloaddexon-fe13949d9d938316c2c1b037b2cbce8e7bead525.tar
dexon-fe13949d9d938316c2c1b037b2cbce8e7bead525.tar.gz
dexon-fe13949d9d938316c2c1b037b2cbce8e7bead525.tar.bz2
dexon-fe13949d9d938316c2c1b037b2cbce8e7bead525.tar.lz
dexon-fe13949d9d938316c2c1b037b2cbce8e7bead525.tar.xz
dexon-fe13949d9d938316c2c1b037b2cbce8e7bead525.tar.zst
dexon-fe13949d9d938316c2c1b037b2cbce8e7bead525.zip
eth/downloader: Doc fixes
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r--eth/downloader/downloader.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index cf8e1becf..6ac58140a 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -153,6 +153,7 @@ type Downloader struct {
chainInsertHook func([]*fetchResult) // Method to call upon inserting a chain of blocks (possibly in multiple invocations)
}
+// LightChain encapsulates functions required to synchronise a light chain.
type LightChain interface {
// HasHeader verifies a header's presence in the local chain.
HasHeader(common.Hash) bool
@@ -173,6 +174,7 @@ type LightChain interface {
Rollback([]common.Hash)
}
+// BlockChain encapsulates functions required to sync a (full or fast) blockchain.
type BlockChain interface {
LightChain
@@ -281,7 +283,7 @@ func (d *Downloader) RegisterPeer(id string, version int, peer Peer) error {
return nil
}
-// RegisterLightPeer injects a light client peer
+// RegisterLightPeer injects a light client peer, wrapping it so it appears as a regular peer.
func (d *Downloader) RegisterLightPeer(id string, version int, peer LightPeer) error {
return d.RegisterPeer(id, version, &lightPeerWrapper{peer})
}