aboutsummaryrefslogtreecommitdiffstats
path: root/les/protocol.go
diff options
context:
space:
mode:
authorFelföldi Zsolt <zsfelfoldi@gmail.com>2017-08-09 00:31:08 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-08-09 00:31:08 +0800
commitfff6e03a792b0e0a84943e2c3764c39b2840458a (patch)
tree37d811da67038ac2bacdf1b1595a8f867b46eba0 /les/protocol.go
parentd375193797e8198a82c6a1796064ffb289c6956e (diff)
downloaddexon-fff6e03a792b0e0a84943e2c3764c39b2840458a.tar.gz
dexon-fff6e03a792b0e0a84943e2c3764c39b2840458a.tar.zst
dexon-fff6e03a792b0e0a84943e2c3764c39b2840458a.zip
les: fix megacheck warnings (#14941)
* les: fix megacheck warnings * les: fixed testGetProofs
Diffstat (limited to 'les/protocol.go')
-rw-r--r--les/protocol.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/les/protocol.go b/les/protocol.go
index 46da2b8c8..33d930ee0 100644
--- a/les/protocol.go
+++ b/les/protocol.go
@@ -23,7 +23,6 @@ import (
"math/big"
"github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp"
)
@@ -105,12 +104,6 @@ var errorToString = map[int]string{
ErrHandshakeMissingKey: "Key missing from handshake message",
}
-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)
-}
-
// announceData is the network packet for the block announcements.
type announceData struct {
Hash common.Hash // Hash of one particular block being announced
@@ -118,11 +111,6 @@ type announceData struct {
Td *big.Int // Total difficulty of one particular block being announced
ReorgDepth uint64
Update keyValueList
-
- haveHeaders uint64 // we have the headers of the remote peer's chain up to this number
- headKnown bool
- requested bool
- next *announceData
}
type blockInfo struct {
@@ -131,12 +119,6 @@ type blockInfo struct {
Td *big.Int // Total difficulty 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
-}
-
// getBlockHeadersData represents a block header query.
type getBlockHeadersData struct {
Origin hashOrNumber // Block from which to retrieve headers
@@ -181,15 +163,6 @@ func (hn *hashOrNumber) DecodeRLP(s *rlp.Stream) error {
return err
}
-// newBlockData is the network packet for the block propagation message.
-type newBlockData struct {
- Block *types.Block
- TD *big.Int
-}
-
-// blockBodiesData is the network packet for block content distribution.
-type blockBodiesData []*types.Body
-
// CodeData is the network response packet for a node data retrieval.
type CodeData []struct {
Value []byte