aboutsummaryrefslogtreecommitdiffstats
path: root/eth/peer.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-07-21 17:36:38 +0800
committerFelix Lange <fjl@twurst.com>2016-07-22 19:17:19 +0800
commit016007bd25f2b5e597c2ac2f7256c4e73574f70e (patch)
treecf32a5d2edb8f8683ada17fa6bf71f878af50999 /eth/peer.go
parenta4c4125b1155d9276614029163b498a17643f0f2 (diff)
downloadgo-tangerine-016007bd25f2b5e597c2ac2f7256c4e73574f70e.tar
go-tangerine-016007bd25f2b5e597c2ac2f7256c4e73574f70e.tar.gz
go-tangerine-016007bd25f2b5e597c2ac2f7256c4e73574f70e.tar.bz2
go-tangerine-016007bd25f2b5e597c2ac2f7256c4e73574f70e.tar.lz
go-tangerine-016007bd25f2b5e597c2ac2f7256c4e73574f70e.tar.xz
go-tangerine-016007bd25f2b5e597c2ac2f7256c4e73574f70e.tar.zst
go-tangerine-016007bd25f2b5e597c2ac2f7256c4e73574f70e.zip
eth, eth/downloader, eth/fetcher: delete eth/61 code
The eth/61 protocol was disabled in #2776, this commit removes its message handlers and hash-chain sync logic.
Diffstat (limited to 'eth/peer.go')
-rw-r--r--eth/peer.go40
1 files changed, 0 insertions, 40 deletions
diff --git a/eth/peer.go b/eth/peer.go
index b97825c69..c8c207ecb 100644
--- a/eth/peer.go
+++ b/eth/peer.go
@@ -25,7 +25,6 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/eth/downloader"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/p2p"
@@ -154,25 +153,6 @@ func (p *peer) SendTransactions(txs types.Transactions) error {
return p2p.Send(p.rw, TxMsg, txs)
}
-// SendBlockHashes sends a batch of known hashes to the remote peer.
-func (p *peer) SendBlockHashes(hashes []common.Hash) error {
- return p2p.Send(p.rw, BlockHashesMsg, hashes)
-}
-
-// SendBlocks sends a batch of blocks to the remote peer.
-func (p *peer) SendBlocks(blocks []*types.Block) error {
- return p2p.Send(p.rw, BlocksMsg, blocks)
-}
-
-// SendNewBlockHashes61 announces the availability of a number of blocks through
-// a hash notification.
-func (p *peer) SendNewBlockHashes61(hashes []common.Hash) error {
- for _, hash := range hashes {
- p.knownBlocks.Add(hash)
- }
- return p2p.Send(p.rw, NewBlockHashesMsg, hashes)
-}
-
// SendNewBlockHashes announces the availability of a number of blocks through
// a hash notification.
func (p *peer) SendNewBlockHashes(hashes []common.Hash, numbers []uint64) error {
@@ -221,26 +201,6 @@ func (p *peer) SendReceiptsRLP(receipts []rlp.RawValue) error {
return p2p.Send(p.rw, ReceiptsMsg, receipts)
}
-// RequestHashes fetches a batch of hashes from a peer, starting at from, going
-// towards the genesis block.
-func (p *peer) RequestHashes(from common.Hash) error {
- glog.V(logger.Debug).Infof("%v fetching hashes (%d) from %x...", p, downloader.MaxHashFetch, from[:4])
- return p2p.Send(p.rw, GetBlockHashesMsg, getBlockHashesData{from, uint64(downloader.MaxHashFetch)})
-}
-
-// RequestHashesFromNumber fetches a batch of hashes from a peer, starting at
-// the requested block number, going upwards towards the genesis block.
-func (p *peer) RequestHashesFromNumber(from uint64, count int) error {
- glog.V(logger.Debug).Infof("%v fetching hashes (%d) from #%d...", p, count, from)
- return p2p.Send(p.rw, GetBlockHashesFromNumberMsg, getBlockHashesFromNumberData{from, uint64(count)})
-}
-
-// RequestBlocks fetches a batch of blocks corresponding to the specified hashes.
-func (p *peer) RequestBlocks(hashes []common.Hash) error {
- glog.V(logger.Debug).Infof("%v fetching %v blocks", p, len(hashes))
- return p2p.Send(p.rw, GetBlocksMsg, hashes)
-}
-
// RequestHeaders is a wrapper around the header query functions to fetch a
// single header. It is used solely by the fetcher.
func (p *peer) RequestOneHeader(hash common.Hash) error {