{"modulePath":"github.com/MaxflowO2/go-mfc","version":"v0.0.0-20210523022220-88b26fd8599d","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ethtest\n\n## Types\n\n```go\ntype BlockBodies eth.BlockBodiesPacket\n```\nBlockBodies is the network packet for block content distribution.\n\n```go\nfunc (bb BlockBodies) Code() int\n```\n\n```go\ntype BlockHeaders eth.BlockHeadersPacket\n```\n\n```go\nfunc (bh BlockHeaders) Code() int\n```\n\n```go\ntype Chain struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (c *Chain) ForkID() forkid.ID\n```\nForkID gets the fork id of the chain.\n\n```go\nfunc (c *Chain) GetHeaders(req GetBlockHeaders) (BlockHeaders, error)\n```\n\n```go\nfunc (c *Chain) Head() *types.Block\n```\nHead returns the chain head.\n\n```go\nfunc (c *Chain) Len() int\n```\nLen returns the length of the chain.\n\n```go\nfunc (c *Chain) Shorten(height int) *Chain\n```\nShorten returns a copy chain of a desired height from the imported\n\n```go\nfunc (c *Chain) TD(height int) *big.Int\n```\nTD calculates the total difficulty of the chain.\n\n```go\nfunc (c *Chain) WriteTo(writer io.Writer) error\n```\n\n```go\ntype Conn struct {\n\t*rlpx.Conn\n\t// contains filtered or unexported fields\n}\n```\nConn represents an individual connection with a peer\n\n```go\nfunc (c *Conn) Read() Message\n```\n\n```go\nfunc (c *Conn) ReadAndServe(chain *Chain, timeout time.Duration) Message\n```\nReadAndServe serves GetBlockHeaders requests while waiting on another message from the node.\n\n```go\nfunc (c *Conn) Write(msg Message) error\n```\n\n```go\ntype Disconnect struct {\n\tReason p2p.DiscReason\n}\n```\nDisconnect is the RLP structure for a disconnect message.\n\n```go\nfunc (d Disconnect) Code() int\n```\n\n```go\ntype Error struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (e *Error) Code() int\n```\n\n```go\nfunc (e *Error) Error() string\n```\n\n```go\nfunc (e *Error) String() string\n```\n\n```go\nfunc (e *Error) Unwrap() error\n```\n\n```go\ntype GetBlockBodies eth.GetBlockBodiesPacket\n```\nGetBlockBodies represents a GetBlockBodies request\n\n```go\nfunc (gbb GetBlockBodies) Code() int\n```\n\n```go\ntype GetBlockHeaders eth.GetBlockHeadersPacket\n```\nGetBlockHeaders represents a block header query.\n\n```go\nfunc (g GetBlockHeaders) Code() int\n```\n\n```go\ntype GetPooledTransactions eth.GetPooledTransactionsPacket\n```\n\n```go\nfunc (gpt GetPooledTransactions) Code() int\n```\n\n```go\ntype Hello struct {\n\tVersion    uint64\n\tName       string\n\tCaps       []p2p.Cap\n\tListenPort uint64\n\tID         []byte // secp256k1 public key\n\n\t// Ignore additional fields (for forward compatibility).\n\tRest []rlp.RawValue `rlp:\"tail\"`\n}\n```\nHello is the RLP structure of the protocol handshake.\n\n```go\nfunc (h Hello) Code() int\n```\n\n```go\ntype Message interface {\n\tCode() int\n}\n```\n\n```go\ntype NewBlock eth.NewBlockPacket\n```\nNewBlock is the network packet for the block propagation message.\n\n```go\nfunc (nb NewBlock) Code() int\n```\n\n```go\ntype NewBlockHashes eth.NewBlockHashesPacket\n```\nNewBlockHashes is the network packet for the block announcements.\n\n```go\nfunc (nbh NewBlockHashes) Code() int\n```\n\n```go\ntype NewPooledTransactionHashes eth.NewPooledTransactionHashesPacket\n```\nNewPooledTransactionHashes is the network packet for the tx hash propagation message.\n\n```go\nfunc (nb NewPooledTransactionHashes) Code() int\n```\n\n```go\ntype Ping struct{}\n```\n\n```go\nfunc (p Ping) Code() int\n```\n\n```go\ntype Pong struct{}\n```\n\n```go\nfunc (p Pong) Code() int\n```\n\n```go\ntype PooledTransactions eth.PooledTransactionsPacket\n```\n\n```go\nfunc (pt PooledTransactions) Code() int\n```\n\n```go\ntype Status eth.StatusPacket\n```\nStatus is the network packet for the status message for eth/64 and later.\n\n```go\nfunc (s Status) Code() int\n```\n\n```go\ntype Suite struct {\n\tDest *enode.Node\n\t// contains filtered or unexported fields\n}\n```\nSuite represents a structure used to test the eth protocol of a node(s).\n\n```go\nfunc NewSuite(dest *enode.Node, chainfile string, genesisfile string) (*Suite, error)\n```\nNewSuite creates and returns a new eth-test suite that can be used to test the given node against the given blockchain data.\n\n```go\nfunc (s *Suite) AllEthTests() []utesting.Test\n```\n\n```go\nfunc (s *Suite) Eth66Tests() []utesting.Test\n```\n\n```go\nfunc (s *Suite) EthTests() []utesting.Test\n```\n\n```go\nfunc (s *Suite) Is_66(t *utesting.T)\n```\nIs\\_66 checks if the node supports the eth66 protocol version, and if not, exists the test suite\n\n```go\nfunc (s *Suite) TestBroadcast(t *utesting.T)\n```\nTestBroadcast tests whether a block announcement is correctly propagated to the given node's peer(s).\n\n```go\nfunc (s *Suite) TestBroadcast_66(t *utesting.T)\n```\nTestBroadcast\\_66 tests whether a block announcement is correctly propagated to the given node's peer(s) on the eth66 protocol.\n\n```go\nfunc (s *Suite) TestGetBlockBodies(t *utesting.T)\n```\nTestGetBlockBodies tests whether the given node can respond to a \\`GetBlockBodies\\` request and that the response is accurate.\n\n```go\nfunc (s *Suite) TestGetBlockBodies_66(t *utesting.T)\n```\nTestGetBlockBodies\\_66 tests whether the given node can respond to a \\`GetBlockBodies\\` request and that the response is accurate over the eth66 protocol.\n\n```go\nfunc (s *Suite) TestGetBlockHeaders(t *utesting.T)\n```\nTestGetBlockHeaders tests whether the given node can respond to a \\`GetBlockHeaders\\` request and that the response is accurate.\n\n```go\nfunc (s *Suite) TestGetBlockHeaders_66(t *utesting.T)\n```\nTestGetBlockHeaders\\_66 tests whether the given node can respond to an eth66 \\`GetBlockHeaders\\` request and that the response is accurate.\n\n```go\nfunc (s *Suite) TestLargeAnnounce(t *utesting.T)\n```\nTestLargeAnnounce tests the announcement mechanism with a large block.\n\n```go\nfunc (s *Suite) TestLargeAnnounce_66(t *utesting.T)\n```\nTestLargeAnnounce\\_66 tests the announcement mechanism with a large block.\n\n```go\nfunc (s *Suite) TestLargeTxRequest_66(t *utesting.T)\n```\nTestLargeTxRequest\\_66 tests whether a node can fulfill a large GetPooledTransactions request.\n\n```go\nfunc (s *Suite) TestMaliciousHandshake(t *utesting.T)\n```\nTestMaliciousHandshake tries to send malicious data during the handshake.\n\n```go\nfunc (s *Suite) TestMaliciousHandshake_66(t *utesting.T)\n```\nTestMaliciousHandshake\\_66 tries to send malicious data during the handshake.\n\n```go\nfunc (s *Suite) TestMaliciousStatus(t *utesting.T)\n```\nTestMaliciousStatus sends a status package with a large total difficulty.\n\n```go\nfunc (s *Suite) TestMaliciousStatus_66(t *utesting.T)\n```\nTestMaliciousStatus\\_66 sends a status package with a large total difficulty.\n\n```go\nfunc (s *Suite) TestMaliciousTx(t *utesting.T)\n```\n\n```go\nfunc (s *Suite) TestMaliciousTx_66(t *utesting.T)\n```\n\n```go\nfunc (s *Suite) TestNewPooledTxs_66(t *utesting.T)\n```\nTestNewPooledTxs\\_66 tests whether a node will do a GetPooledTransactions request upon receiving a NewPooledTransactionHashes announcement.\n\n```go\nfunc (s *Suite) TestOldAnnounce(t *utesting.T)\n```\n\n```go\nfunc (s *Suite) TestOldAnnounce_66(t *utesting.T)\n```\n\n```go\nfunc (s *Suite) TestSameRequestID_66(t *utesting.T)\n```\nTestSameRequestID\\_66 sends two requests with the same request ID concurrently to a single node.\n\n```go\nfunc (s *Suite) TestSimultaneousRequests_66(t *utesting.T)\n```\nTestSimultaneousRequests\\_66 sends two simultaneous \\`GetBlockHeader\\` requests with different request IDs and checks to make sure the node responds with the correct headers per request.\n\n```go\nfunc (s *Suite) TestStatus(t *utesting.T)\n```\nTestStatus 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.\n\n```go\nfunc (s *Suite) TestStatus_66(t *utesting.T)\n```\nTestStatus\\_66 attempts to connect to the given node and exchange a status message with it on the eth66 protocol, and then check to make sure the chain head is correct.\n\n```go\nfunc (s *Suite) TestTransaction(t *utesting.T)\n```\n\n```go\nfunc (s *Suite) TestTransaction_66(t *utesting.T)\n```\n\n```go\nfunc (s *Suite) TestZeroRequestID_66(t *utesting.T)\n```\nTestZeroRequestID\\_66 checks that a request ID of zero is still handled by the node.\n\n```go\ntype Transactions eth.TransactionsPacket\n```\n\n```go\nfunc (t Transactions) Code() int\n```\n\n","path":"github.com/MaxflowO2/go-mfc/cmd/devp2p/internal/ethtest","name":"ethtest","synopsis":"","isRedistributable":true}
