eth/downloader, les, light: Changes in response to review

This commit is contained in:
Nick Johnson
2017-07-03 15:17:12 +01:00
parent ae11545bc5
commit be8f8409bc
5 changed files with 52 additions and 51 deletions

View File

@ -895,26 +895,13 @@ func (pc *peerConnection) RequestHeadersByNumber(origin uint64, amount int, skip
return nil
}
func (pc *peerConnection) RequestBodies(hashes []common.Hash) error {
panic("RequestBodies not supported in light client mode sync")
}
func (pc *peerConnection) RequestReceipts(hashes []common.Hash) error {
panic("RequestReceipts not supported in light client mode sync")
}
func (pc *peerConnection) RequestNodeData(hashes []common.Hash) error {
panic("RequestNodeData not supported in light client mode sync")
}
func (d *downloaderPeerNotify) registerPeer(p *peer) {
pm := (*ProtocolManager)(d)
pc := &peerConnection{
manager: pm,
peer: p,
}
pm.downloader.RegisterPeer(p.id, ethVersion, pc)
pm.downloader.RegisterLightPeer(p.id, ethVersion, pc)
}
func (d *downloaderPeerNotify) unregisterPeer(p *peer) {