Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
1c90d97c
Unverified
Commit
1c90d97c
authored
May 05, 2022
by
s7v7nislands
Committed by
GitHub
May 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/protocols/eth: fix godoc comments (#24810)
Co-authored-by:
Martin Holst Swende
<
martin@swende.se
>
parent
7f6f01d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
peer.go
eth/protocols/eth/peer.go
+2
-2
protocol.go
eth/protocols/eth/protocol.go
+11
-11
No files found.
eth/protocols/eth/peer.go
View file @
1c90d97c
...
...
@@ -296,7 +296,7 @@ func (p *Peer) AsyncSendNewBlock(block *types.Block, td *big.Int) {
}
}
// ReplyBlockHeaders
is the eth/66 version of Send
BlockHeaders.
// ReplyBlockHeaders
RLP is the eth/66 response to Get
BlockHeaders.
func
(
p
*
Peer
)
ReplyBlockHeadersRLP
(
id
uint64
,
headers
[]
rlp
.
RawValue
)
error
{
return
p2p
.
Send
(
p
.
rw
,
BlockHeadersMsg
,
&
BlockHeadersRLPPacket66
{
RequestId
:
id
,
...
...
@@ -304,7 +304,7 @@ func (p *Peer) ReplyBlockHeadersRLP(id uint64, headers []rlp.RawValue) error {
})
}
// ReplyBlockBodiesRLP is the eth/66
version of SendBlockBodiesRLP
.
// ReplyBlockBodiesRLP is the eth/66
response to GetBlockBodies
.
func
(
p
*
Peer
)
ReplyBlockBodiesRLP
(
id
uint64
,
bodies
[]
rlp
.
RawValue
)
error
{
// Not packed into BlockBodiesPacket to avoid RLP decoding
return
p2p
.
Send
(
p
.
rw
,
BlockBodiesMsg
,
&
BlockBodiesRLPPacket66
{
...
...
eth/protocols/eth/protocol.go
View file @
1c90d97c
...
...
@@ -169,7 +169,7 @@ func (hn *HashOrNumber) DecodeRLP(s *rlp.Stream) error {
// BlockHeadersPacket represents a block header response.
type
BlockHeadersPacket
[]
*
types
.
Header
// BlockHeadersPacket represents a block header response over eth/66.
// BlockHeadersPacket
66
represents a block header response over eth/66.
type
BlockHeadersPacket66
struct
{
RequestId
uint64
BlockHeadersPacket
...
...
@@ -179,7 +179,7 @@ type BlockHeadersPacket66 struct {
// have the headers rlp encoded.
type
BlockHeadersRLPPacket
[]
rlp
.
RawValue
// BlockHeaders
Packet
represents a block header response over eth/66.
// BlockHeaders
RLPPacket66
represents a block header response over eth/66.
type
BlockHeadersRLPPacket66
struct
{
RequestId
uint64
BlockHeadersRLPPacket
...
...
@@ -207,7 +207,7 @@ func (request *NewBlockPacket) sanityCheck() error {
// GetBlockBodiesPacket represents a block body query.
type
GetBlockBodiesPacket
[]
common
.
Hash
// GetBlockBodiesPacket represents a block body query over eth/66.
// GetBlockBodiesPacket
66
represents a block body query over eth/66.
type
GetBlockBodiesPacket66
struct
{
RequestId
uint64
GetBlockBodiesPacket
...
...
@@ -216,7 +216,7 @@ type GetBlockBodiesPacket66 struct {
// BlockBodiesPacket is the network packet for block content distribution.
type
BlockBodiesPacket
[]
*
BlockBody
// BlockBodiesPacket is the network packet for block content distribution over eth/66.
// BlockBodiesPacket
66
is the network packet for block content distribution over eth/66.
type
BlockBodiesPacket66
struct
{
RequestId
uint64
BlockBodiesPacket
...
...
@@ -255,7 +255,7 @@ func (p *BlockBodiesPacket) Unpack() ([][]*types.Transaction, [][]*types.Header)
// GetNodeDataPacket represents a trie node data query.
type
GetNodeDataPacket
[]
common
.
Hash
// GetNodeDataPacket represents a trie node data query over eth/66.
// GetNodeDataPacket
66
represents a trie node data query over eth/66.
type
GetNodeDataPacket66
struct
{
RequestId
uint64
GetNodeDataPacket
...
...
@@ -264,7 +264,7 @@ type GetNodeDataPacket66 struct {
// NodeDataPacket is the network packet for trie node data distribution.
type
NodeDataPacket
[][]
byte
// NodeDataPacket is the network packet for trie node data distribution over eth/66.
// NodeDataPacket
66
is the network packet for trie node data distribution over eth/66.
type
NodeDataPacket66
struct
{
RequestId
uint64
NodeDataPacket
...
...
@@ -273,7 +273,7 @@ type NodeDataPacket66 struct {
// GetReceiptsPacket represents a block receipts query.
type
GetReceiptsPacket
[]
common
.
Hash
// GetReceiptsPacket represents a block receipts query over eth/66.
// GetReceiptsPacket
66
represents a block receipts query over eth/66.
type
GetReceiptsPacket66
struct
{
RequestId
uint64
GetReceiptsPacket
...
...
@@ -282,7 +282,7 @@ type GetReceiptsPacket66 struct {
// ReceiptsPacket is the network packet for block receipts distribution.
type
ReceiptsPacket
[][]
*
types
.
Receipt
// ReceiptsPacket is the network packet for block receipts distribution over eth/66.
// ReceiptsPacket
66
is the network packet for block receipts distribution over eth/66.
type
ReceiptsPacket66
struct
{
RequestId
uint64
ReceiptsPacket
...
...
@@ -291,7 +291,7 @@ type ReceiptsPacket66 struct {
// ReceiptsRLPPacket is used for receipts, when we already have it encoded
type
ReceiptsRLPPacket
[]
rlp
.
RawValue
// ReceiptsPacket66 is the eth-66 version of ReceiptsRLPPacket
// Receipts
RLP
Packet66 is the eth-66 version of ReceiptsRLPPacket
type
ReceiptsRLPPacket66
struct
{
RequestId
uint64
ReceiptsRLPPacket
...
...
@@ -311,13 +311,13 @@ type GetPooledTransactionsPacket66 struct {
// PooledTransactionsPacket is the network packet for transaction distribution.
type
PooledTransactionsPacket
[]
*
types
.
Transaction
// PooledTransactionsPacket is the network packet for transaction distribution over eth/66.
// PooledTransactionsPacket
66
is the network packet for transaction distribution over eth/66.
type
PooledTransactionsPacket66
struct
{
RequestId
uint64
PooledTransactionsPacket
}
// PooledTransactionsPacket is the network packet for transaction distribution, used
// PooledTransactions
RLP
Packet is the network packet for transaction distribution, used
// in the cases we already have them in rlp-encoded form
type
PooledTransactionsRLPPacket
[]
rlp
.
RawValue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment