aboutsummaryrefslogtreecommitdiffstats
path: root/eth/protocol.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/protocol.go
parenta4c4125b1155d9276614029163b498a17643f0f2 (diff)
downloadgo-tangerine-016007bd25f2b5e597c2ac2f7256c4e73574f70e.tar.gz
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/protocol.go')
-rw-r--r--eth/protocol.go46
1 files changed, 5 insertions, 41 deletions
diff --git a/eth/protocol.go b/eth/protocol.go
index 7de0cb020..69b3be578 100644
--- a/eth/protocol.go
+++ b/eth/protocol.go
@@ -28,7 +28,6 @@ import (
// Constants to match up protocol versions and messages
const (
- eth61 = 61
eth62 = 62
eth63 = 63
)
@@ -49,26 +48,15 @@ const (
// eth protocol message codes
const (
- // Protocol messages belonging to eth/61
- StatusMsg = 0x00
- NewBlockHashesMsg = 0x01
- TxMsg = 0x02
- GetBlockHashesMsg = 0x03
- BlockHashesMsg = 0x04
- GetBlocksMsg = 0x05
- BlocksMsg = 0x06
- NewBlockMsg = 0x07
- GetBlockHashesFromNumberMsg = 0x08
-
- // Protocol messages belonging to eth/62 (new protocol from scratch)
- // StatusMsg = 0x00 (uncomment after eth/61 deprecation)
- // NewBlockHashesMsg = 0x01 (uncomment after eth/61 deprecation)
- // TxMsg = 0x02 (uncomment after eth/61 deprecation)
+ // Protocol messages belonging to eth/62
+ StatusMsg = 0x00
+ NewBlockHashesMsg = 0x01
+ TxMsg = 0x02
GetBlockHeadersMsg = 0x03
BlockHeadersMsg = 0x04
GetBlockBodiesMsg = 0x05
BlockBodiesMsg = 0x06
- // NewBlockMsg = 0x07 (uncomment after eth/61 deprecation)
+ NewBlockMsg = 0x07
// Protocol messages belonging to eth/63
GetNodeDataMsg = 0x0d
@@ -117,12 +105,6 @@ type txPool interface {
GetTransactions() types.Transactions
}
-type chainManager interface {
- GetBlockHashesFromHash(hash common.Hash, amount uint64) (hashes []common.Hash)
- GetBlock(hash common.Hash) (block *types.Block)
- Status() (td *big.Int, currentBlock common.Hash, genesisBlock common.Hash)
-}
-
// statusData is the network packet for the status message.
type statusData struct {
ProtocolVersion uint32
@@ -138,19 +120,6 @@ type newBlockHashesData []struct {
Number uint64 // Number of one particular block being announced
}
-// getBlockHashesData is the network packet for the hash based hash retrieval.
-type getBlockHashesData struct {
- Hash common.Hash
- Amount uint64
-}
-
-// getBlockHashesFromNumberData is the network packet for the number based hash
-// retrieval.
-type getBlockHashesFromNumberData struct {
- Number uint64
- Amount uint64
-}
-
// getBlockHeadersData represents a block header query.
type getBlockHeadersData struct {
Origin hashOrNumber // Block from which to retrieve headers
@@ -209,8 +178,3 @@ type blockBody struct {
// blockBodiesData is the network packet for block content distribution.
type blockBodiesData []*blockBody
-
-// nodeDataData is the network response packet for a node data retrieval.
-type nodeDataData []struct {
- Value []byte
-}