diff options
author | Felix Lange <fjl@twurst.com> | 2016-07-23 05:23:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-23 05:23:30 +0800 |
commit | 60cd5bf9397bd8331bce3bb1884524d43c31dbb5 (patch) | |
tree | 17768268a303d5dbb1478797eaf49eb6979e9e0b /eth/protocol.go | |
parent | f58ac2b46b66a81515a119a2b1924a831afdd0c9 (diff) | |
parent | 016007bd25f2b5e597c2ac2f7256c4e73574f70e (diff) | |
download | dexon-60cd5bf9397bd8331bce3bb1884524d43c31dbb5.tar dexon-60cd5bf9397bd8331bce3bb1884524d43c31dbb5.tar.gz dexon-60cd5bf9397bd8331bce3bb1884524d43c31dbb5.tar.bz2 dexon-60cd5bf9397bd8331bce3bb1884524d43c31dbb5.tar.lz dexon-60cd5bf9397bd8331bce3bb1884524d43c31dbb5.tar.xz dexon-60cd5bf9397bd8331bce3bb1884524d43c31dbb5.tar.zst dexon-60cd5bf9397bd8331bce3bb1884524d43c31dbb5.zip |
Merge pull request #2842 from fjl/downloader-remove-eth61
eth, eth/downloader, eth/fetcher: delete eth/61 sync code
Diffstat (limited to 'eth/protocol.go')
-rw-r--r-- | eth/protocol.go | 46 |
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 -} |