Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockBodies ¶
BlockBodies is the network packet for block content distribution.
func (BlockBodies) Code ¶
func (bb BlockBodies) Code() int
type BlockHeaders ¶
func (BlockHeaders) Code ¶
func (bh BlockHeaders) Code() int
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
type Disconnect ¶
type Disconnect struct {
Reason p2p.DiscReason
}
Disconnect is the RLP structure for a disconnect message.
func (Disconnect) Code ¶
func (d Disconnect) Code() int
type GetBlockBodies ¶
GetBlockBodies represents a GetBlockBodies request
func (GetBlockBodies) Code ¶
func (gbb GetBlockBodies) Code() int
type GetBlockHeaders ¶
type GetBlockHeaders struct {
Origin hashOrNumber // Block from which to retrieve headers
Amount uint64 // Maximum number of headers to retrieve
Skip uint64 // Blocks to skip between consecutive headers
Reverse bool // Query direction (false = rising towards latest, true = falling towards genesis)
}
GetBlockHeaders represents a block header query.
func (GetBlockHeaders) Code ¶
func (g GetBlockHeaders) Code() int
type Hello ¶
type Hello struct {
Version uint64
Name string
Caps []p2p.Cap
ListenPort uint64
ID []byte // secp256k1 public key
// Ignore additional fields (for forward compatibility).
Rest []rlp.RawValue `rlp:"tail"`
}
Hello is the RLP structure of the protocol handshake.
type NewBlockHashes ¶
type NewBlockHashes []struct {
Hash common.Hash // Hash of one particular block being announced
Number uint64 // Number of one particular block being announced
}
NewBlockHashes is the network packet for the block announcements.
func (NewBlockHashes) Code ¶
func (nbh NewBlockHashes) Code() int
type Status ¶
type Status struct {
ProtocolVersion uint32
NetworkID uint64
TD *big.Int
Head common.Hash
Genesis common.Hash
ForkID forkid.ID
}
Status is the network packet for the status message for eth/64 and later.
type Suite ¶
Suite represents a structure used to test the eth protocol of a node(s).
func NewSuite ¶
NewSuite creates and returns a new eth-test suite that can be used to test the given node against the given blockchain data.
func (*Suite) TestBroadcast ¶
TestBroadcast tests whether a block announcement is correctly propagated to the given node's peer(s).
func (*Suite) TestGetBlockBodies ¶
TestGetBlockBodies tests whether the given node can respond to a `GetBlockBodies` request and that the response is accurate.
func (*Suite) TestGetBlockHeaders ¶
TestGetBlockHeaders tests whether the given node can respond to a `GetBlockHeaders` request and that the response is accurate.
func (*Suite) TestStatus ¶
TestStatus attempts to connect to the given node and exchange a status message with it, and then check to make sure the chain head is correct.