Skip to content

Commit 1c90d97

Browse files
eth/protocols/eth: fix godoc comments (#24810)
Co-authored-by: Martin Holst Swende <[email protected]>
1 parent 7f6f01d commit 1c90d97

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
@@ -296,15 +296,15 @@ func (p *Peer) AsyncSendNewBlock(block *types.Block, td *big.Int) {
296296
}
297297
}
298298

299-
// ReplyBlockHeaders is the eth/66 version of SendBlockHeaders.
299+
// ReplyBlockHeadersRLP is the eth/66 response to GetBlockHeaders.
300300
func (p *Peer) ReplyBlockHeadersRLP(id uint64, headers []rlp.RawValue) error {
301301
return p2p.Send(p.rw, BlockHeadersMsg, &BlockHeadersRLPPacket66{
302302
RequestId: id,
303303
BlockHeadersRLPPacket: headers,
304304
})
305305
}
306306

307-
// ReplyBlockBodiesRLP is the eth/66 version of SendBlockBodiesRLP.
307+
// ReplyBlockBodiesRLP is the eth/66 response to GetBlockBodies.
308308
func (p *Peer) ReplyBlockBodiesRLP(id uint64, bodies []rlp.RawValue) error {
309309
// Not packed into BlockBodiesPacket to avoid RLP decoding
310310
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
@@ -169,7 +169,7 @@ func (hn *HashOrNumber) DecodeRLP(s *rlp.Stream) error {
169169
// BlockHeadersPacket represents a block header response.
170170
type BlockHeadersPacket []*types.Header
171171

172-
// BlockHeadersPacket represents a block header response over eth/66.
172+
// BlockHeadersPacket66 represents a block header response over eth/66.
173173
type BlockHeadersPacket66 struct {
174174
RequestId uint64
175175
BlockHeadersPacket
@@ -179,7 +179,7 @@ type BlockHeadersPacket66 struct {
179179
// have the headers rlp encoded.
180180
type BlockHeadersRLPPacket []rlp.RawValue
181181

182-
// BlockHeadersPacket represents a block header response over eth/66.
182+
// BlockHeadersRLPPacket66 represents a block header response over eth/66.
183183
type BlockHeadersRLPPacket66 struct {
184184
RequestId uint64
185185
BlockHeadersRLPPacket
@@ -207,7 +207,7 @@ func (request *NewBlockPacket) sanityCheck() error {
207207
// GetBlockBodiesPacket represents a block body query.
208208
type GetBlockBodiesPacket []common.Hash
209209

210-
// GetBlockBodiesPacket represents a block body query over eth/66.
210+
// GetBlockBodiesPacket66 represents a block body query over eth/66.
211211
type GetBlockBodiesPacket66 struct {
212212
RequestId uint64
213213
GetBlockBodiesPacket
@@ -216,7 +216,7 @@ type GetBlockBodiesPacket66 struct {
216216
// BlockBodiesPacket is the network packet for block content distribution.
217217
type BlockBodiesPacket []*BlockBody
218218

219-
// BlockBodiesPacket is the network packet for block content distribution over eth/66.
219+
// BlockBodiesPacket66 is the network packet for block content distribution over eth/66.
220220
type BlockBodiesPacket66 struct {
221221
RequestId uint64
222222
BlockBodiesPacket
@@ -255,7 +255,7 @@ func (p *BlockBodiesPacket) Unpack() ([][]*types.Transaction, [][]*types.Header)
255255
// GetNodeDataPacket represents a trie node data query.
256256
type GetNodeDataPacket []common.Hash
257257

258-
// GetNodeDataPacket represents a trie node data query over eth/66.
258+
// GetNodeDataPacket66 represents a trie node data query over eth/66.
259259
type GetNodeDataPacket66 struct {
260260
RequestId uint64
261261
GetNodeDataPacket
@@ -264,7 +264,7 @@ type GetNodeDataPacket66 struct {
264264
// NodeDataPacket is the network packet for trie node data distribution.
265265
type NodeDataPacket [][]byte
266266

267-
// NodeDataPacket is the network packet for trie node data distribution over eth/66.
267+
// NodeDataPacket66 is the network packet for trie node data distribution over eth/66.
268268
type NodeDataPacket66 struct {
269269
RequestId uint64
270270
NodeDataPacket
@@ -273,7 +273,7 @@ type NodeDataPacket66 struct {
273273
// GetReceiptsPacket represents a block receipts query.
274274
type GetReceiptsPacket []common.Hash
275275

276-
// GetReceiptsPacket represents a block receipts query over eth/66.
276+
// GetReceiptsPacket66 represents a block receipts query over eth/66.
277277
type GetReceiptsPacket66 struct {
278278
RequestId uint64
279279
GetReceiptsPacket
@@ -282,7 +282,7 @@ type GetReceiptsPacket66 struct {
282282
// ReceiptsPacket is the network packet for block receipts distribution.
283283
type ReceiptsPacket [][]*types.Receipt
284284

285-
// ReceiptsPacket is the network packet for block receipts distribution over eth/66.
285+
// ReceiptsPacket66 is the network packet for block receipts distribution over eth/66.
286286
type ReceiptsPacket66 struct {
287287
RequestId uint64
288288
ReceiptsPacket
@@ -291,7 +291,7 @@ type ReceiptsPacket66 struct {
291291
// ReceiptsRLPPacket is used for receipts, when we already have it encoded
292292
type ReceiptsRLPPacket []rlp.RawValue
293293

294-
// ReceiptsPacket66 is the eth-66 version of ReceiptsRLPPacket
294+
// ReceiptsRLPPacket66 is the eth-66 version of ReceiptsRLPPacket
295295
type ReceiptsRLPPacket66 struct {
296296
RequestId uint64
297297
ReceiptsRLPPacket
@@ -311,13 +311,13 @@ type GetPooledTransactionsPacket66 struct {
311311
// PooledTransactionsPacket is the network packet for transaction distribution.
312312
type PooledTransactionsPacket []*types.Transaction
313313

314-
// PooledTransactionsPacket is the network packet for transaction distribution over eth/66.
314+
// PooledTransactionsPacket66 is the network packet for transaction distribution over eth/66.
315315
type PooledTransactionsPacket66 struct {
316316
RequestId uint64
317317
PooledTransactionsPacket
318318
}
319319

320-
// PooledTransactionsPacket is the network packet for transaction distribution, used
320+
// PooledTransactionsRLPPacket is the network packet for transaction distribution, used
321321
// in the cases we already have them in rlp-encoded form
322322
type PooledTransactionsRLPPacket []rlp.RawValue
323323

0 commit comments

Comments
 (0)