Skip to content

Commit 0f457d7

Browse files
s7v7nislandsholiman
authored andcommitted
eth/protocols/eth: fix godoc comments (ethereum#24810)
Co-authored-by: Martin Holst Swende <[email protected]>
1 parent a33aded commit 0f457d7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

eth/protocols/eth/peer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func (p *Peer) ReplyBlockHeaders(id uint64, headers []*types.Header) error {
327327
})
328328
}
329329

330-
// ReplyBlockHeaders is the eth/66 version of SendBlockHeaders.
330+
// ReplyBlockHeadersRLP is the eth/66 response to GetBlockHeaders.
331331
func (p *Peer) ReplyBlockHeadersRLP(id uint64, headers []rlp.RawValue) error {
332332
return p2p.Send(p.rw, BlockHeadersMsg, &BlockHeadersRLPPacket66{
333333
RequestId: id,
@@ -341,7 +341,7 @@ func (p *Peer) SendBlockBodiesRLP(bodies []rlp.RawValue) error {
341341
return p2p.Send(p.rw, BlockBodiesMsg, bodies) // Not packed into BlockBodiesPacket to avoid RLP decoding
342342
}
343343

344-
// ReplyBlockBodiesRLP is the eth/66 version of SendBlockBodiesRLP.
344+
// ReplyBlockBodiesRLP is the eth/66 response to GetBlockBodies.
345345
func (p *Peer) ReplyBlockBodiesRLP(id uint64, bodies []rlp.RawValue) error {
346346
// Not packed into BlockBodiesPacket to avoid RLP decoding
347347
return p2p.Send(p.rw, BlockBodiesMsg, &BlockBodiesRLPPacket66{

eth/protocols/eth/protocol.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (hn *HashOrNumber) DecodeRLP(s *rlp.Stream) error {
185185
// BlockHeadersPacket represents a block header response.
186186
type BlockHeadersPacket []*types.Header
187187

188-
// BlockHeadersPacket represents a block header response over eth/66.
188+
// BlockHeadersPacket66 represents a block header response over eth/66.
189189
type BlockHeadersPacket66 struct {
190190
RequestId uint64
191191
BlockHeadersPacket
@@ -195,7 +195,7 @@ type BlockHeadersPacket66 struct {
195195
// have the headers rlp encoded.
196196
type BlockHeadersRLPPacket []rlp.RawValue
197197

198-
// BlockHeadersPacket represents a block header response over eth/66.
198+
// BlockHeadersRLPPacket66 represents a block header response over eth/66.
199199
type BlockHeadersRLPPacket66 struct {
200200
RequestId uint64
201201
BlockHeadersRLPPacket
@@ -223,7 +223,7 @@ func (request *NewBlockPacket) sanityCheck() error {
223223
// GetBlockBodiesPacket represents a block body query.
224224
type GetBlockBodiesPacket []common.Hash
225225

226-
// GetBlockBodiesPacket represents a block body query over eth/66.
226+
// GetBlockBodiesPacket66 represents a block body query over eth/66.
227227
type GetBlockBodiesPacket66 struct {
228228
RequestId uint64
229229
GetBlockBodiesPacket
@@ -232,7 +232,7 @@ type GetBlockBodiesPacket66 struct {
232232
// BlockBodiesPacket is the network packet for block content distribution.
233233
type BlockBodiesPacket []*BlockBody
234234

235-
// BlockBodiesPacket is the network packet for block content distribution over eth/66.
235+
// BlockBodiesPacket66 is the network packet for block content distribution over eth/66.
236236
type BlockBodiesPacket66 struct {
237237
RequestId uint64
238238
BlockBodiesPacket
@@ -271,7 +271,7 @@ func (p *BlockBodiesPacket) Unpack() ([][]*types.Transaction, [][]*types.Header)
271271
// GetNodeDataPacket represents a trie node data query.
272272
type GetNodeDataPacket []common.Hash
273273

274-
// GetNodeDataPacket represents a trie node data query over eth/66.
274+
// GetNodeDataPacket66 represents a trie node data query over eth/66.
275275
type GetNodeDataPacket66 struct {
276276
RequestId uint64
277277
GetNodeDataPacket
@@ -280,7 +280,7 @@ type GetNodeDataPacket66 struct {
280280
// NodeDataPacket is the network packet for trie node data distribution.
281281
type NodeDataPacket [][]byte
282282

283-
// NodeDataPacket is the network packet for trie node data distribution over eth/66.
283+
// NodeDataPacket66 is the network packet for trie node data distribution over eth/66.
284284
type NodeDataPacket66 struct {
285285
RequestId uint64
286286
NodeDataPacket
@@ -289,7 +289,7 @@ type NodeDataPacket66 struct {
289289
// GetReceiptsPacket represents a block receipts query.
290290
type GetReceiptsPacket []common.Hash
291291

292-
// GetReceiptsPacket represents a block receipts query over eth/66.
292+
// GetReceiptsPacket66 represents a block receipts query over eth/66.
293293
type GetReceiptsPacket66 struct {
294294
RequestId uint64
295295
GetReceiptsPacket
@@ -298,7 +298,7 @@ type GetReceiptsPacket66 struct {
298298
// ReceiptsPacket is the network packet for block receipts distribution.
299299
type ReceiptsPacket [][]*types.Receipt
300300

301-
// ReceiptsPacket is the network packet for block receipts distribution over eth/66.
301+
// ReceiptsPacket66 is the network packet for block receipts distribution over eth/66.
302302
type ReceiptsPacket66 struct {
303303
RequestId uint64
304304
ReceiptsPacket
@@ -307,7 +307,7 @@ type ReceiptsPacket66 struct {
307307
// ReceiptsRLPPacket is used for receipts, when we already have it encoded
308308
type ReceiptsRLPPacket []rlp.RawValue
309309

310-
// ReceiptsPacket66 is the eth-66 version of ReceiptsRLPPacket
310+
// ReceiptsRLPPacket66 is the eth-66 version of ReceiptsRLPPacket
311311
type ReceiptsRLPPacket66 struct {
312312
RequestId uint64
313313
ReceiptsRLPPacket
@@ -327,13 +327,13 @@ type GetPooledTransactionsPacket66 struct {
327327
// PooledTransactionsPacket is the network packet for transaction distribution.
328328
type PooledTransactionsPacket []*types.Transaction
329329

330-
// PooledTransactionsPacket is the network packet for transaction distribution over eth/66.
330+
// PooledTransactionsPacket66 is the network packet for transaction distribution over eth/66.
331331
type PooledTransactionsPacket66 struct {
332332
RequestId uint64
333333
PooledTransactionsPacket
334334
}
335335

336-
// PooledTransactionsPacket is the network packet for transaction distribution, used
336+
// PooledTransactionsRLPPacket is the network packet for transaction distribution, used
337337
// in the cases we already have them in rlp-encoded form
338338
type PooledTransactionsRLPPacket []rlp.RawValue
339339

0 commit comments

Comments
 (0)