go-ethereum: github.com/ethereum/go-ethereum/cmd/devp2p/internal/v5test Index | Files

package v5test

import "github.com/ethereum/go-ethereum/cmd/devp2p/internal/v5test"


Package Files

discv5tests.go framework.go

type Suite Uses

type Suite struct {
    Dest             *enode.Node
    Listen1, Listen2 string // listening addresses

Suite is the discv5 test suite.

func (*Suite) AllTests Uses

func (s *Suite) AllTests() []utesting.Test

func (*Suite) TestFindnodeResults Uses

func (s *Suite) TestFindnodeResults(t *utesting.T)

In this test, multiple nodes ping the node under test. After waiting for them to be accepted into the remote table, the test checks that they are returned by FINDNODE.

func (*Suite) TestFindnodeZeroDistance Uses

func (s *Suite) TestFindnodeZeroDistance(t *utesting.T)

This test checks that the remote node returns itself for FINDNODE with distance zero.

func (*Suite) TestPing Uses

func (s *Suite) TestPing(t *utesting.T)

This test sends PING and expects a PONG response.

func (*Suite) TestPingHandshakeInterrupted Uses

func (s *Suite) TestPingHandshakeInterrupted(t *utesting.T)

This test starts a handshake, but doesn't finish it and sends a second ordinary message packet instead of a handshake message packet. The remote node should respond with another WHOAREYOU challenge for the second packet.

func (*Suite) TestPingLargeRequestID Uses

func (s *Suite) TestPingLargeRequestID(t *utesting.T)

This test sends PING with a 9-byte request ID, which isn't allowed by the spec. The remote node should not respond.

func (*Suite) TestPingMultiIP Uses

func (s *Suite) TestPingMultiIP(t *utesting.T)

In this test, a session is established from one IP as usual. The session is then reused on another IP, which shouldn't work. The remote node should respond with WHOAREYOU for the attempt from a different IP.

func (*Suite) TestTalkRequest Uses

func (s *Suite) TestTalkRequest(t *utesting.T)

This test sends TALKREQ and expects an empty TALKRESP response.

Package v5test imports 14 packages (graph) and is imported by 1 packages. Updated 2020-10-15. Refresh now. Tools for package owners.