Skip to content

Commit e12632d

Browse files
committed
eth/protocols: change comments
1 parent 31c75fa commit e12632d

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

eth/protocols/eth/handlers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func handleGetBlockHeaders(backend Backend, msg Decoder, peer *Peer) error {
3838
return peer.SendBlockHeaders(response)
3939
}
4040

41-
// handleGetBlockHeaders66 is the ETH-66 version of handleGetBlockHeaders
41+
// handleGetBlockHeaders66 is the eth/66 version of handleGetBlockHeaders
4242
func handleGetBlockHeaders66(backend Backend, msg Decoder, peer *Peer) error {
4343
// Decode the complex header query
4444
var query GetBlockHeadersPacket66

eth/protocols/eth/peer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func (p *Peer) SendPooledTransactionsRLP(hashes []common.Hash, txs PooledTransac
267267
return p2p.Send(p.rw, PooledTransactionsMsg, txs) // Not packed into PooledTransactionsPacket to avoid RLP decoding
268268
}
269269

270-
// ReplyPooledTransactionsRLP is the ETH-66 version of SendPooledTransactionsRLP
270+
// ReplyPooledTransactionsRLP is the eth/66 version of SendPooledTransactionsRLP
271271
func (p *Peer) ReplyPooledTransactionsRLP(id uint64, hashes []common.Hash, txs PooledTransactionsRLPPacket) error {
272272
// Mark all the transactions as known, but ensure we don't overflow our limits
273273
for p.knownTxs.Cardinality() > max(0, maxKnownTxs-len(hashes)) {
@@ -363,7 +363,7 @@ func (p *Peer) SendNodeData(data NodeDataPacket) error {
363363
return p2p.Send(p.rw, NodeDataMsg, data)
364364
}
365365

366-
// ReplyNodeData is the ETH-66 response to GetNodeData
366+
// ReplyNodeData is the eth/66 response to GetNodeData
367367
func (p *Peer) ReplyNodeData(id uint64, data NodeDataPacket) error {
368368
return p2p.Send(p.rw, NodeDataMsg, NodeDataPacket66{id, data})
369369
}
@@ -374,7 +374,7 @@ func (p *Peer) SendReceiptsRLP(receipts ReceiptsRLPPacket) error {
374374
return p2p.Send(p.rw, ReceiptsMsg, receipts) // Not packed into ReceiptsPacket to avoid RLP decoding
375375
}
376376

377-
// ReplyReceiptsRLP is the ETH-66 response to GetReceipts
377+
// ReplyReceiptsRLP is the eth/66 response to GetReceipts
378378
func (p *Peer) ReplyReceiptsRLP(id uint64, receipts ReceiptsRLPPacket) error {
379379
return p2p.Send(p.rw, ReceiptsMsg, ReceiptsRLPPacket66{id, receipts})
380380
}

eth/protocols/eth/protocol.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ type GetBlockHeadersPacket struct {
129129
Reverse bool // Query direction (false = rising towards latest, true = falling towards genesis)
130130
}
131131

132-
// GetBlockHeadersPacket represents a block header query over ETH-66
132+
// GetBlockHeadersPacket represents a block header query over eth/66
133133
type GetBlockHeadersPacket66 struct {
134134
RequestId uint64
135135
*GetBlockHeadersPacket
@@ -174,7 +174,7 @@ func (hn *HashOrNumber) DecodeRLP(s *rlp.Stream) error {
174174
// BlockHeadersPacket represents a block header response.
175175
type BlockHeadersPacket []*types.Header
176176

177-
// BlockHeadersPacket represents a block header response over ETH-66.
177+
// BlockHeadersPacket represents a block header response over eth/66.
178178
type BlockHeadersPacket66 struct {
179179
RequestId uint64
180180
BlockHeadersPacket
@@ -202,7 +202,7 @@ func (request *NewBlockPacket) sanityCheck() error {
202202
// GetBlockBodiesPacket represents a block body query.
203203
type GetBlockBodiesPacket []common.Hash
204204

205-
// GetBlockBodiesPacket represents a block body query over ETH-66.
205+
// GetBlockBodiesPacket represents a block body query over eth/66.
206206
type GetBlockBodiesPacket66 struct {
207207
RequestId uint64
208208
GetBlockBodiesPacket
@@ -216,13 +216,13 @@ type BlockBodiesPacket []*BlockBody
216216
// roundtrip.
217217
type BlockBodiesRLPPacket []rlp.RawValue
218218

219-
// BlockBodiesRLPPacket66 is the BlockBodiesRLPPacket over ETH-66
219+
// BlockBodiesRLPPacket66 is the BlockBodiesRLPPacket over eth/66
220220
type BlockBodiesRLPPacket66 struct {
221221
RequestId uint64
222222
BlockBodiesRLPPacket
223223
}
224224

225-
// BlockBodiesPacket is the network packet for block content distribution over ETH-66.
225+
// BlockBodiesPacket is the network packet for block content distribution over eth/66.
226226
type BlockBodiesPacket66 struct {
227227
RequestId uint64
228228
BlockBodiesPacket
@@ -250,7 +250,7 @@ func (p *BlockBodiesPacket) Unpack() ([][]*types.Transaction, [][]*types.Header)
250250
// GetNodeDataPacket represents a trie node data query.
251251
type GetNodeDataPacket []common.Hash
252252

253-
// GetNodeDataPacket represents a trie node data query over ETH-66.
253+
// GetNodeDataPacket represents a trie node data query over eth/66.
254254
type GetNodeDataPacket66 struct {
255255
RequestId uint64
256256
GetNodeDataPacket
@@ -259,7 +259,7 @@ type GetNodeDataPacket66 struct {
259259
// NodeDataPacket is the network packet for trie node data distribution.
260260
type NodeDataPacket [][]byte
261261

262-
// NodeDataPacket is the network packet for trie node data distribution over ETH-66.
262+
// NodeDataPacket is the network packet for trie node data distribution over eth/66.
263263
type NodeDataPacket66 struct {
264264
RequestId uint64
265265
NodeDataPacket
@@ -268,7 +268,7 @@ type NodeDataPacket66 struct {
268268
// GetReceiptsPacket represents a block receipts query.
269269
type GetReceiptsPacket []common.Hash
270270

271-
// GetReceiptsPacket represents a block receipts query over ETH-66.
271+
// GetReceiptsPacket represents a block receipts query over eth/66.
272272
type GetReceiptsPacket66 struct {
273273
RequestId uint64
274274
GetReceiptsPacket
@@ -277,7 +277,7 @@ type GetReceiptsPacket66 struct {
277277
// ReceiptsPacket is the network packet for block receipts distribution.
278278
type ReceiptsPacket [][]*types.Receipt
279279

280-
// ReceiptsPacket is the network packet for block receipts distribution over ETH-66.
280+
// ReceiptsPacket is the network packet for block receipts distribution over eth/66.
281281
type ReceiptsPacket66 struct {
282282
RequestId uint64
283283
ReceiptsPacket
@@ -306,7 +306,7 @@ type GetPooledTransactionsPacket66 struct {
306306
// PooledTransactionsPacket is the network packet for transaction distribution.
307307
type PooledTransactionsPacket []*types.Transaction
308308

309-
// PooledTransactionsPacket is the network packet for transaction distribution over ETH-66.
309+
// PooledTransactionsPacket is the network packet for transaction distribution over eth/66.
310310
type PooledTransactionsPacket66 struct {
311311
RequestId uint64
312312
PooledTransactionsPacket
@@ -316,7 +316,7 @@ type PooledTransactionsPacket66 struct {
316316
// in the cases we already have them in rlp-encoded form
317317
type PooledTransactionsRLPPacket []rlp.RawValue
318318

319-
// PooledTransactionsRLPPacket66 is the ETH-66 form of PooledTransactionsRLPPacket
319+
// PooledTransactionsRLPPacket66 is the eth/66 form of PooledTransactionsRLPPacket
320320
type PooledTransactionsRLPPacket66 struct {
321321
RequestId uint64
322322
PooledTransactionsRLPPacket

eth/protocols/eth/protocol_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ package eth
1818

1919
import (
2020
"bytes"
21-
"fmt"
22-
"github.com/ethereum/go-ethereum/core/types"
2321
"math/big"
2422
"testing"
2523

2624
"github.com/ethereum/go-ethereum/common"
25+
"github.com/ethereum/go-ethereum/core/types"
2726
"github.com/ethereum/go-ethereum/rlp"
2827
)
2928

0 commit comments

Comments
 (0)